hotspot/src/share/tools/ProjectCreator/WinGammaPlatformVC6.java
author sla
Wed, 15 Dec 2010 07:11:31 -0800
changeset 7452 b3fa838286de
parent 7397 5b173b4ca846
child 8303 81a0b8663748
permissions -rw-r--r--
7006354: Updates to Visual Studio project creation and development launcher Summary: Updates to Visual Studio project creation and development launcher Reviewed-by: stefank, coleenp
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
/*
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
     2
 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     4
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
489c9b5090e2 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
489c9b5090e2 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     8
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
489c9b5090e2 Initial load
duke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
489c9b5090e2 Initial load
duke
parents:
diff changeset
    13
 * accompanied this code).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    14
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
489c9b5090e2 Initial load
duke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    18
 *
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1
diff changeset
    21
 * questions.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    22
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    23
 */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    24
489c9b5090e2 Initial load
duke
parents:
diff changeset
    25
import java.io.*;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    26
import java.util.*;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    27
489c9b5090e2 Initial load
duke
parents:
diff changeset
    28
public class WinGammaPlatformVC6 extends WinGammaPlatform {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    29
    public void writeProjectFile(String projectFileName, String projectName,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    30
                                 Vector allConfigs) throws IOException {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    31
        Vector allConfigNames = new Vector();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    32
489c9b5090e2 Initial load
duke
parents:
diff changeset
    33
        printWriter = new PrintWriter(new FileWriter(projectFileName));
489c9b5090e2 Initial load
duke
parents:
diff changeset
    34
        String cfg = ((BuildConfig)allConfigs.get(0)).get("Name");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    35
489c9b5090e2 Initial load
duke
parents:
diff changeset
    36
        printWriter.println("# Microsoft Developer Studio Project File - Name=\"" + projectName + "\" - Package Owner=<4>");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    37
        printWriter.println("# Microsoft Developer Studio Generated Build File, Format Version 6.00");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    38
        printWriter.println("# ** DO NOT EDIT **");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    39
        printWriter.println("");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    40
        printWriter.println("# TARGTYPE \"Win32 (x86) Dynamic-Link Library\" 0x0102");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    41
        printWriter.println("CFG=" + cfg);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    42
        printWriter.println("");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    43
489c9b5090e2 Initial load
duke
parents:
diff changeset
    44
        printWriter.println("!MESSAGE This is not a valid makefile. To build this project using NMAKE,");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    45
        printWriter.println("!MESSAGE use the Export Makefile command and run");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    46
        printWriter.println("!MESSAGE ");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    47
        printWriter.println("!MESSAGE NMAKE /f \"" + projectName + ".mak\".");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    48
        printWriter.println("!MESSAGE ");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    49
        printWriter.println("!MESSAGE You can specify a configuration when running NMAKE");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    50
        printWriter.println("!MESSAGE by defining the macro CFG on the command line. For example:");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    51
        printWriter.println("!MESSAGE ");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    52
        printWriter.println("!MESSAGE NMAKE /f \"" + projectName + ".mak\" CFG=\"" + cfg + "\"");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    53
        printWriter.println("!MESSAGE ");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
        printWriter.println("!MESSAGE Possible choices for configuration are:");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    55
        printWriter.println("!MESSAGE ");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    56
        for (Iterator i = allConfigs.iterator(); i.hasNext(); ) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    57
            String name = ((BuildConfig)i.next()).get("Name");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    58
            printWriter.println("!MESSAGE \""+ name + "\" (based on \"Win32 (x86) Dynamic-Link Library\")");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
            allConfigNames.add(name);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
        }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
        printWriter.println("!MESSAGE ");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
        printWriter.println("");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
        printWriter.println("# Begin Project");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    65
        printWriter.println("# PROP AllowPerConfigDependencies 0");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
        printWriter.println("# PROP Scc_ProjName \"\"");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    67
        printWriter.println("# PROP Scc_LocalPath \"\"");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    68
        printWriter.println("CPP=cl.exe");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    69
        printWriter.println("MTL=midl.exe");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    70
        printWriter.println("RSC=rc.exe");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    71
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
        String keyword = "!IF";
489c9b5090e2 Initial load
duke
parents:
diff changeset
    74
        for (Iterator i = allConfigs.iterator(); i.hasNext(); ) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
            BuildConfig bcfg = (BuildConfig)i.next();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
            printWriter.println(keyword + "  \"$(CFG)\" == \"" + bcfg.get("Name") + "\"");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
            writeConfigHeader(bcfg);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    78
            keyword = "!ELSEIF";
489c9b5090e2 Initial load
duke
parents:
diff changeset
    79
            if (!i.hasNext()) printWriter.println("!ENDIF");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
        }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
489c9b5090e2 Initial load
duke
parents:
diff changeset
    82
489c9b5090e2 Initial load
duke
parents:
diff changeset
    83
        TreeSet sortedFiles = sortFiles(computeAttributedFiles(allConfigs));
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
489c9b5090e2 Initial load
duke
parents:
diff changeset
    85
        printWriter.println("# Begin Target");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
        for (Iterator i = allConfigs.iterator(); i.hasNext(); ) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    88
            printWriter.println("# Name \"" + ((BuildConfig)i.next()).get("Name") + "\"");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    89
        }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
        printWriter.println("# Begin Group \"Header Files\"");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    91
        printWriter.println("# PROP Default_Filter \"h;hpp;hxx;hm;inl;fi;fd\"");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    92
489c9b5090e2 Initial load
duke
parents:
diff changeset
    93
        Iterator i = sortedFiles.iterator();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    94
489c9b5090e2 Initial load
duke
parents:
diff changeset
    95
        while (i.hasNext()) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    96
            FileInfo fi = (FileInfo)i.next();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    97
489c9b5090e2 Initial load
duke
parents:
diff changeset
    98
            // skip sources
489c9b5090e2 Initial load
duke
parents:
diff changeset
    99
            if (!fi.isHeader()) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   100
                continue;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   101
            }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   102
489c9b5090e2 Initial load
duke
parents:
diff changeset
   103
            printFile(fi, allConfigNames);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   104
        }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   105
        printWriter.println("# End Group");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   106
        printWriter.println("");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   107
489c9b5090e2 Initial load
duke
parents:
diff changeset
   108
        printWriter.println("# Begin Group \"Source Files\"");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   109
        printWriter.println("# PROP Default_Filter \"cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90\"");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   110
489c9b5090e2 Initial load
duke
parents:
diff changeset
   111
        i = sortedFiles.iterator();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   112
        while (i.hasNext()) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   113
            FileInfo fi = (FileInfo)i.next();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   114
489c9b5090e2 Initial load
duke
parents:
diff changeset
   115
            // skip headers
489c9b5090e2 Initial load
duke
parents:
diff changeset
   116
            if (fi.isHeader()) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   117
                continue;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   118
            }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   119
489c9b5090e2 Initial load
duke
parents:
diff changeset
   120
            printFile(fi, allConfigNames);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   121
        }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   122
        printWriter.println("# End Group");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   123
        printWriter.println("");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   124
489c9b5090e2 Initial load
duke
parents:
diff changeset
   125
489c9b5090e2 Initial load
duke
parents:
diff changeset
   126
        printWriter.println("# Begin Group \"Resource Files\"");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   127
        printWriter.println("# PROP Default_Filter \"ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe\"");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   128
        printWriter.println("# End Group");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   129
        printWriter.println("");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   130
        printWriter.println("# End Target");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   131
489c9b5090e2 Initial load
duke
parents:
diff changeset
   132
        printWriter.println("# End Project");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   133
489c9b5090e2 Initial load
duke
parents:
diff changeset
   134
        printWriter.close();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   135
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   136
489c9b5090e2 Initial load
duke
parents:
diff changeset
   137
489c9b5090e2 Initial load
duke
parents:
diff changeset
   138
    void printFile(FileInfo fi, Vector allConfigNames) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   139
        printWriter.println("# Begin Source File");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   140
        printWriter.println("");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   141
        printWriter.println("SOURCE=\"" + fi.full + "\"");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   142
        FileAttribute attr = fi.attr;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   143
489c9b5090e2 Initial load
duke
parents:
diff changeset
   144
        if (attr.noPch) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   145
            printWriter.println("# SUBTRACT CPP /YX /Yc /Yu");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   146
        }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   147
489c9b5090e2 Initial load
duke
parents:
diff changeset
   148
        if (attr.pchRoot) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   149
            printWriter.println("# ADD CPP /Yc\"incls/_precompiled.incl\"");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   150
        }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   151
        if (attr.configs != null) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   152
            String keyword = "!IF";
489c9b5090e2 Initial load
duke
parents:
diff changeset
   153
            for (Iterator j=allConfigNames.iterator(); j.hasNext();) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   154
                String cfg = (String)j.next();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   155
                if (!attr.configs.contains(cfg)) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   156
                    printWriter.println(keyword+" \"$(CFG)\" == \"" + cfg +"\"");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   157
                    printWriter.println("# PROP BASE Exclude_From_Build 1");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   158
                    printWriter.println("# PROP Exclude_From_Build 1");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   159
                    keyword = "!ELSEIF";
489c9b5090e2 Initial load
duke
parents:
diff changeset
   160
                }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   161
            }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   162
            printWriter.println("!ENDIF");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   163
        }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   164
489c9b5090e2 Initial load
duke
parents:
diff changeset
   165
        printWriter.println("# End Source File");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   166
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   167
489c9b5090e2 Initial load
duke
parents:
diff changeset
   168
    void writeConfigHeader(BuildConfig cfg) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   169
        printWriter.println("# Begin Special Build Tool");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   170
        printWriter.println("SOURCE=\"$(InputPath)\"");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   171
        printWriter.println("PreLink_Desc=" +  BuildConfig.getFieldString(null, "PrelinkDescription"));
489c9b5090e2 Initial load
duke
parents:
diff changeset
   172
        printWriter.println("PreLink_Cmds=" +
489c9b5090e2 Initial load
duke
parents:
diff changeset
   173
                            cfg.expandFormat(BuildConfig.getFieldString(null, "PrelinkCommand")));
489c9b5090e2 Initial load
duke
parents:
diff changeset
   174
        printWriter.println("# End Special Build Tool");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   175
        printWriter.println("");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   176
489c9b5090e2 Initial load
duke
parents:
diff changeset
   177
        for (Iterator i = cfg.getV("CompilerFlags").iterator(); i.hasNext(); ) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   178
            printWriter.println("# "+(String)i.next());
489c9b5090e2 Initial load
duke
parents:
diff changeset
   179
        }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   180
489c9b5090e2 Initial load
duke
parents:
diff changeset
   181
489c9b5090e2 Initial load
duke
parents:
diff changeset
   182
        printWriter.println("LINK32=link.exe");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   183
489c9b5090e2 Initial load
duke
parents:
diff changeset
   184
        for (Iterator i = cfg.getV("LinkerFlags").iterator(); i.hasNext(); ) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   185
            printWriter.println("# "+(String)i.next());
489c9b5090e2 Initial load
duke
parents:
diff changeset
   186
        }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   187
489c9b5090e2 Initial load
duke
parents:
diff changeset
   188
        printWriter.println("ADD BASE MTL /nologo /D \"_DEBUG\" /mktyplib203 /win32");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   189
        printWriter.println("ADD MTL /nologo /D \"_DEBUG\" /mktyplib203 /win32");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   190
        printWriter.println("ADD BASE RSC /l 0x409 /d \"_DEBUG\"");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   191
        printWriter.println("ADD RSC /l 0x409 /d \"_DEBUG\"");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   192
        printWriter.println("BSC32=bscmake.exe");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   193
        printWriter.println("ADD BASE BSC32 /nologo");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   194
        printWriter.println("ADD BSC32 /nologo");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   195
        printWriter.println("");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   196
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   197
489c9b5090e2 Initial load
duke
parents:
diff changeset
   198
    protected String getProjectExt() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   199
        return ".dsp";
489c9b5090e2 Initial load
duke
parents:
diff changeset
   200
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   201
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   202
489c9b5090e2 Initial load
duke
parents:
diff changeset
   203
489c9b5090e2 Initial load
duke
parents:
diff changeset
   204
class CompilerInterfaceVC6  extends CompilerInterface {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   205
    Vector getBaseCompilerFlags(Vector defines, Vector includes, String outDir) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   206
        Vector rv = new Vector();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   207
489c9b5090e2 Initial load
duke
parents:
diff changeset
   208
        rv.add("PROP BASE Use_MFC 0");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   209
        rv.add("PROP Use_MFC 0");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   210
        rv.add("ADD CPP /nologo /MT /W3 /WX /GX /YX /Fr /FD /c");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   211
        rv.add("PROP BASE Output_Dir \""+outDir+"\"");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   212
        rv.add("PROP Output_Dir \""+outDir+"\"");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   213
        rv.add("PROP BASE Intermediate_Dir \""+outDir+"\"");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   214
        rv.add("PROP Intermediate_Dir \""+outDir+"\"");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   215
        rv.add("PROP BASE Target_Dir \"\"");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   216
        rv.add("PROP Target_Dir \"\"");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   217
        rv.add("ADD BASE CPP "+Util.prefixed_join(" /I ", includes, true));
489c9b5090e2 Initial load
duke
parents:
diff changeset
   218
        rv.add("ADD CPP "+Util.prefixed_join(" /I ", includes, true));
489c9b5090e2 Initial load
duke
parents:
diff changeset
   219
        rv.add("ADD BASE CPP "+Util.prefixed_join(" /D ", defines, true));
489c9b5090e2 Initial load
duke
parents:
diff changeset
   220
        rv.add("ADD CPP "+Util.prefixed_join(" /D ", defines, true));
489c9b5090e2 Initial load
duke
parents:
diff changeset
   221
        rv.add("ADD CPP /Yu\"incls/_precompiled.incl\"");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   222
489c9b5090e2 Initial load
duke
parents:
diff changeset
   223
        return rv;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   224
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   225
489c9b5090e2 Initial load
duke
parents:
diff changeset
   226
    Vector getBaseLinkerFlags(String outDir, String outDll) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   227
        Vector rv = new Vector();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   228
489c9b5090e2 Initial load
duke
parents:
diff changeset
   229
        rv.add("PROP Ignore_Export_Lib 0");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   230
        rv.add("ADD BASE CPP /MD");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   231
        rv.add("ADD CPP /MD");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   232
        rv.add("ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib " +
489c9b5090e2 Initial load
duke
parents:
diff changeset
   233
               "           advapi32.lib shell32.lib ole32.lib oleaut32.lib winmm.lib");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   234
        rv.add("ADD LINK32      /out:\""+outDll+"\" "+
489c9b5090e2 Initial load
duke
parents:
diff changeset
   235
               "                /nologo /subsystem:windows /machine:I386" +
489c9b5090e2 Initial load
duke
parents:
diff changeset
   236
               "                /nologo /base:\"0x8000000\" /subsystem:windows /dll" +
489c9b5090e2 Initial load
duke
parents:
diff changeset
   237
               "                /export:JNI_GetDefaultJavaVMInitArgs /export:JNI_CreateJavaVM /export:JNI_GetCreatedJavaVMs "+
489c9b5090e2 Initial load
duke
parents:
diff changeset
   238
               "                /export:jio_snprintf /export:jio_printf /export:jio_fprintf /export:jio_vfprintf "+
489c9b5090e2 Initial load
duke
parents:
diff changeset
   239
               "                /export:jio_vsnprintf ");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   240
        rv.add("SUBTRACT LINK32 /pdb:none /map");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   241
489c9b5090e2 Initial load
duke
parents:
diff changeset
   242
        return rv;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   243
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   244
489c9b5090e2 Initial load
duke
parents:
diff changeset
   245
    Vector getDebugCompilerFlags(String opt) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   246
        Vector rv = new Vector();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   247
489c9b5090e2 Initial load
duke
parents:
diff changeset
   248
        rv.add("ADD BASE CPP /Gm /Zi /O"+opt);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   249
489c9b5090e2 Initial load
duke
parents:
diff changeset
   250
        return rv;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   251
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   252
489c9b5090e2 Initial load
duke
parents:
diff changeset
   253
    Vector getDebugLinkerFlags() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   254
        Vector rv = new Vector();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   255
489c9b5090e2 Initial load
duke
parents:
diff changeset
   256
        rv.add("PROP BASE Use_Debug_Libraries 1");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   257
        rv.add("PROP Use_Debug_Libraries 1");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   258
        rv.add("ADD LINK32 /debug");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   259
489c9b5090e2 Initial load
duke
parents:
diff changeset
   260
        return rv;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   261
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   262
7452
b3fa838286de 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 7397
diff changeset
   263
    void getAdditionalNonKernelLinkerFlags(Vector rv) {}
b3fa838286de 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 7397
diff changeset
   264
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   265
    Vector getProductCompilerFlags() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   266
        Vector rv = new Vector();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   267
489c9b5090e2 Initial load
duke
parents:
diff changeset
   268
        rv.add("ADD CPP /O"+getOptFlag());
489c9b5090e2 Initial load
duke
parents:
diff changeset
   269
489c9b5090e2 Initial load
duke
parents:
diff changeset
   270
        return rv;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   271
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   272
489c9b5090e2 Initial load
duke
parents:
diff changeset
   273
    Vector getProductLinkerFlags() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   274
        Vector rv = new Vector();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   275
489c9b5090e2 Initial load
duke
parents:
diff changeset
   276
        rv.add("PROP BASE Use_Debug_Libraries 0");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   277
        rv.add("PROP Use_Debug_Libraries 0");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   278
489c9b5090e2 Initial load
duke
parents:
diff changeset
   279
        return rv;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   280
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   281
489c9b5090e2 Initial load
duke
parents:
diff changeset
   282
    String getOptFlag() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   283
        return "2";
489c9b5090e2 Initial load
duke
parents:
diff changeset
   284
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   285
489c9b5090e2 Initial load
duke
parents:
diff changeset
   286
    String getNoOptFlag() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   287
        return "d";
489c9b5090e2 Initial load
duke
parents:
diff changeset
   288
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   289
489c9b5090e2 Initial load
duke
parents:
diff changeset
   290
    String makeCfgName(String flavourBuild) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   291
        return "vm - "+ Util.os + " " + flavourBuild;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   292
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   293
}