annotate src/share/tools/MakeDeps/WinGammaPlatformVC6.java @ 795:215f81b4d9b3

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