Mercurial > hg > truffle
annotate src/share/tools/ProjectCreator/BuildConfig.java @ 4572:76841bdd5f3e
(Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
author | Andreas Woess <andreas.woess@jku.at> |
---|---|
date | Sat, 11 Feb 2012 23:35:44 +0100 |
parents | f400f9554f09 |
children | 8bc6f680a88d |
rev | line source |
---|---|
0 | 1 /* |
2233
15d6977f04b0
7017824: Add support for creating 64-bit Visual Studio projects
sla
parents:
2027
diff
changeset
|
2 * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. |
0 | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | |
5 * This code is free software; you can redistribute it and/or modify it | |
6 * under the terms of the GNU General Public License version 2 only, as | |
7 * published by the Free Software Foundation. | |
8 * | |
9 * This code is distributed in the hope that it will be useful, but WITHOUT | |
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
12 * version 2 for more details (a copy is included in the LICENSE file that | |
13 * accompanied this code). | |
14 * | |
15 * You should have received a copy of the GNU General Public License version | |
16 * 2 along with this work; if not, write to the Free Software Foundation, | |
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
18 * | |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
844
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
844
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
844
diff
changeset
|
21 * questions. |
0 | 22 * |
23 */ | |
24 | |
25 import java.io.File; | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
26 import java.util.Enumeration; |
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
27 import java.util.Hashtable; |
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
28 import java.util.Iterator; |
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
29 import java.util.Vector; |
0 | 30 |
31 class BuildConfig { | |
32 Hashtable vars; | |
33 Vector basicNames, basicPaths; | |
34 String[] context; | |
35 | |
36 static CompilerInterface ci; | |
37 static CompilerInterface getCI() { | |
38 if (ci == null) { | |
39 String comp = (String)getField(null, "CompilerVersion"); | |
40 try { | |
41 ci = (CompilerInterface)Class.forName("CompilerInterface" + comp).newInstance(); | |
42 } catch (Exception cnfe) { | |
43 System.err.println("Cannot find support for compiler " + comp); | |
44 throw new RuntimeException(cnfe.toString()); | |
45 } | |
46 } | |
47 return ci; | |
48 } | |
49 | |
50 protected void initNames(String flavour, String build, String outDll) { | |
51 if (vars == null) vars = new Hashtable(); | |
52 | |
53 String flavourBuild = flavour + "_" + build; | |
2233
15d6977f04b0
7017824: Add support for creating 64-bit Visual Studio projects
sla
parents:
2027
diff
changeset
|
54 String platformName = getFieldString(null, "PlatformName"); |
1972 | 55 System.out.println(); |
56 System.out.println(flavourBuild); | |
57 | |
2233
15d6977f04b0
7017824: Add support for creating 64-bit Visual Studio projects
sla
parents:
2027
diff
changeset
|
58 put("Name", getCI().makeCfgName(flavourBuild, platformName)); |
0 | 59 put("Flavour", flavour); |
60 put("Build", build); | |
2233
15d6977f04b0
7017824: Add support for creating 64-bit Visual Studio projects
sla
parents:
2027
diff
changeset
|
61 put("PlatformName", platformName); |
0 | 62 |
63 // ones mentioned above were needed to expand format | |
64 String buildBase = expandFormat(getFieldString(null, "BuildBase")); | |
65 String sourceBase = getFieldString(null, "SourceBase"); | |
4177
c843578c269d
Make building work on Windows.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
3543
diff
changeset
|
66 String outDir = buildBase; |
c843578c269d
Make building work on Windows.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
3543
diff
changeset
|
67 String value = System.getenv("OUT_DIR"); |
c843578c269d
Make building work on Windows.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
3543
diff
changeset
|
68 if (value != null) { |
c843578c269d
Make building work on Windows.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
3543
diff
changeset
|
69 outDir = value; |
c843578c269d
Make building work on Windows.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
3543
diff
changeset
|
70 } |
4572
76841bdd5f3e
(Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents:
4475
diff
changeset
|
71 if(outDir.endsWith("fastdebug")) { |
76841bdd5f3e
(Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents:
4475
diff
changeset
|
72 outDir = outDir.substring(0, outDir.lastIndexOf("fastdebug") - 1); |
76841bdd5f3e
(Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents:
4475
diff
changeset
|
73 } else if (outDir.endsWith("debug")) { |
4475
f400f9554f09
fixed windows build, filtered methodDataOop for reflection
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4474
diff
changeset
|
74 outDir = outDir.substring(0, outDir.lastIndexOf("debug") - 1); |
f400f9554f09
fixed windows build, filtered methodDataOop for reflection
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4474
diff
changeset
|
75 } |
f400f9554f09
fixed windows build, filtered methodDataOop for reflection
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4474
diff
changeset
|
76 |
f400f9554f09
fixed windows build, filtered methodDataOop for reflection
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4474
diff
changeset
|
77 if (!build.equals("product")) { |
f400f9554f09
fixed windows build, filtered methodDataOop for reflection
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4474
diff
changeset
|
78 outDir += Util.sep + build; |
f400f9554f09
fixed windows build, filtered methodDataOop for reflection
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4474
diff
changeset
|
79 } |
4177
c843578c269d
Make building work on Windows.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
3543
diff
changeset
|
80 outDir += Util.sep + "jre" + Util.sep + "bin"; |
4572
76841bdd5f3e
(Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents:
4475
diff
changeset
|
81 if (flavour.equals("graal")) { |
4177
c843578c269d
Make building work on Windows.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
3543
diff
changeset
|
82 outDir += Util.sep + "graal"; |
4572
76841bdd5f3e
(Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents:
4475
diff
changeset
|
83 } else if (flavour.equals("compiler1")) { |
76841bdd5f3e
(Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents:
4475
diff
changeset
|
84 outDir += Util.sep + "client"; |
4177
c843578c269d
Make building work on Windows.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
3543
diff
changeset
|
85 } else { |
c843578c269d
Make building work on Windows.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
3543
diff
changeset
|
86 outDir += Util.sep + "server"; |
c843578c269d
Make building work on Windows.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
3543
diff
changeset
|
87 } |
c843578c269d
Make building work on Windows.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
3543
diff
changeset
|
88 buildBase = outDir; |
0 | 89 |
90 put("Id", flavourBuild); | |
91 put("OutputDir", outDir); | |
92 put("SourceBase", sourceBase); | |
93 put("BuildBase", buildBase); | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
94 put("OutputDll", outDir + Util.sep + outDll); |
0 | 95 |
96 context = new String [] {flavourBuild, flavour, build, null}; | |
97 } | |
98 | |
99 protected void init(Vector includes, Vector defines) { | |
100 initDefaultDefines(defines); | |
101 initDefaultCompilerFlags(includes); | |
102 initDefaultLinkerFlags(); | |
1972 | 103 handleDB(); |
0 | 104 } |
105 | |
106 | |
107 protected void initDefaultCompilerFlags(Vector includes) { | |
108 Vector compilerFlags = new Vector(); | |
109 | |
110 compilerFlags.addAll(getCI().getBaseCompilerFlags(getV("Define"), | |
111 includes, | |
112 get("OutputDir"))); | |
113 | |
114 put("CompilerFlags", compilerFlags); | |
115 } | |
116 | |
117 protected void initDefaultLinkerFlags() { | |
118 Vector linkerFlags = new Vector(); | |
119 | |
2233
15d6977f04b0
7017824: Add support for creating 64-bit Visual Studio projects
sla
parents:
2027
diff
changeset
|
120 linkerFlags.addAll(getCI().getBaseLinkerFlags( get("OutputDir"), get("OutputDll"), get("PlatformName"))); |
0 | 121 |
122 put("LinkerFlags", linkerFlags); | |
123 } | |
124 | |
125 DirectoryTree getSourceTree(String sourceBase, String startAt) { | |
126 DirectoryTree tree = new DirectoryTree(); | |
127 | |
128 tree.addSubdirToIgnore("Codemgr_wsdata"); | |
129 tree.addSubdirToIgnore("deleted_files"); | |
130 tree.addSubdirToIgnore("SCCS"); | |
131 if (startAt != null) { | |
132 tree.readDirectory(sourceBase + File.separator + startAt); | |
133 } else { | |
134 tree.readDirectory(sourceBase); | |
135 } | |
136 | |
137 return tree; | |
138 } | |
139 | |
140 | |
2233
15d6977f04b0
7017824: Add support for creating 64-bit Visual Studio projects
sla
parents:
2027
diff
changeset
|
141 Vector getPreferredPaths() { |
0 | 142 Vector preferredPaths = new Vector(); |
2233
15d6977f04b0
7017824: Add support for creating 64-bit Visual Studio projects
sla
parents:
2027
diff
changeset
|
143 |
0 | 144 // In the case of multiple files with the same name in |
2233
15d6977f04b0
7017824: Add support for creating 64-bit Visual Studio projects
sla
parents:
2027
diff
changeset
|
145 // different subdirectories, prefer these versions |
15d6977f04b0
7017824: Add support for creating 64-bit Visual Studio projects
sla
parents:
2027
diff
changeset
|
146 preferredPaths.add("windows"); |
15d6977f04b0
7017824: Add support for creating 64-bit Visual Studio projects
sla
parents:
2027
diff
changeset
|
147 preferredPaths.add("x86"); |
15d6977f04b0
7017824: Add support for creating 64-bit Visual Studio projects
sla
parents:
2027
diff
changeset
|
148 preferredPaths.add("closed"); |
15d6977f04b0
7017824: Add support for creating 64-bit Visual Studio projects
sla
parents:
2027
diff
changeset
|
149 |
0 | 150 // Also prefer "opto" over "adlc" for adlcVMDeps.hpp |
151 preferredPaths.add("opto"); | |
152 | |
153 return preferredPaths; | |
154 } | |
155 | |
156 | |
1972 | 157 void handleDB() { |
0 | 158 WinGammaPlatform platform = (WinGammaPlatform)getField(null, "PlatformObject"); |
159 | |
2233
15d6977f04b0
7017824: Add support for creating 64-bit Visual Studio projects
sla
parents:
2027
diff
changeset
|
160 putSpecificField("AllFilesHash", computeAllFiles(platform)); |
0 | 161 } |
162 | |
163 | |
1972 | 164 private boolean matchesIgnoredPath(String prefixedName) { |
165 Vector rv = new Vector(); | |
166 collectRelevantVectors(rv, "IgnorePath"); | |
167 for (Iterator i = rv.iterator(); i.hasNext(); ) { | |
168 String pathPart = (String) i.next(); | |
169 if (prefixedName.contains(Util.normalize(pathPart))) { | |
170 return true; | |
171 } | |
172 } | |
173 return false; | |
174 } | |
175 | |
0 | 176 void addAll(Iterator i, Hashtable hash, |
177 WinGammaPlatform platform, DirectoryTree tree, | |
178 Vector preferredPaths, Vector filesNotFound, Vector filesDuplicate) { | |
179 for (; i.hasNext(); ) { | |
180 String fileName = (String) i.next(); | |
181 if (lookupHashFieldInContext("IgnoreFile", fileName) == null) { | |
182 String prefixedName = platform.envVarPrefixedFileName(fileName, | |
183 0, /* ignored */ | |
184 tree, | |
185 preferredPaths, | |
186 filesNotFound, | |
187 filesDuplicate); | |
188 if (prefixedName != null) { | |
1972 | 189 prefixedName = Util.normalize(prefixedName); |
190 if (!matchesIgnoredPath(prefixedName)) { | |
191 addTo(hash, prefixedName, fileName); | |
192 } | |
0 | 193 } |
194 } | |
195 } | |
196 } | |
197 | |
198 void addTo(Hashtable ht, String key, String value) { | |
199 ht.put(expandFormat(key), expandFormat(value)); | |
200 } | |
201 | |
2233
15d6977f04b0
7017824: Add support for creating 64-bit Visual Studio projects
sla
parents:
2027
diff
changeset
|
202 Hashtable computeAllFiles(WinGammaPlatform platform) { |
0 | 203 Hashtable rv = new Hashtable(); |
204 DirectoryTree tree = getSourceTree(get("SourceBase"), getFieldString(null, "StartAt")); | |
2233
15d6977f04b0
7017824: Add support for creating 64-bit Visual Studio projects
sla
parents:
2027
diff
changeset
|
205 Vector preferredPaths = getPreferredPaths(); |
0 | 206 |
207 // Hold errors until end | |
208 Vector filesNotFound = new Vector(); | |
209 Vector filesDuplicate = new Vector(); | |
210 | |
1972 | 211 Vector includedFiles = new Vector(); |
0 | 212 |
213 // find all files | |
1972 | 214 Vector dirs = getSourceIncludes(); |
215 for (Iterator i = dirs.iterator(); i.hasNext(); ) { | |
216 String dir = (String)i.next(); | |
217 DirectoryTree subtree = getSourceTree(dir, null); | |
218 for (Iterator fi = subtree.getFileIterator(); fi.hasNext(); ) { | |
219 String name = ((File)fi.next()).getName(); | |
220 includedFiles.add(name); | |
221 } | |
0 | 222 } |
1972 | 223 addAll(includedFiles.iterator(), rv, |
0 | 224 platform, tree, |
225 preferredPaths, filesNotFound, filesDuplicate); | |
226 | |
227 Vector addFiles = new Vector(); | |
228 collectRelevantVectors(addFiles, "AdditionalFile"); | |
229 addAll(addFiles.iterator(), rv, | |
230 platform, tree, | |
231 preferredPaths, filesNotFound, filesDuplicate); | |
232 | |
233 collectRelevantHashes(rv, "AdditionalGeneratedFile"); | |
234 | |
235 if ((filesNotFound.size() != 0) || | |
236 (filesDuplicate.size() != 0)) { | |
237 System.err.println("Error: some files were not found or " + | |
238 "appeared in multiple subdirectories of " + | |
239 "directory " + get("SourceBase") + " and could not " + | |
2233
15d6977f04b0
7017824: Add support for creating 64-bit Visual Studio projects
sla
parents:
2027
diff
changeset
|
240 "be resolved with os_family and arch."); |
0 | 241 if (filesNotFound.size() != 0) { |
242 System.err.println("Files not found:"); | |
243 for (Iterator iter = filesNotFound.iterator(); | |
244 iter.hasNext(); ) { | |
245 System.err.println(" " + (String) iter.next()); | |
246 } | |
247 } | |
248 if (filesDuplicate.size() != 0) { | |
249 System.err.println("Duplicate files:"); | |
250 for (Iterator iter = filesDuplicate.iterator(); | |
251 iter.hasNext(); ) { | |
252 System.err.println(" " + (String) iter.next()); | |
253 } | |
254 } | |
255 throw new RuntimeException(); | |
256 } | |
257 | |
258 return rv; | |
259 } | |
260 | |
261 void initDefaultDefines(Vector defines) { | |
262 Vector sysDefines = new Vector(); | |
2184
5d801e6b9a80
Imported build system changes from other repository.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
2044
diff
changeset
|
263 |
2273 | 264 if( vars.get("PlatformName").equals("Win32")) { |
2184
5d801e6b9a80
Imported build system changes from other repository.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
2044
diff
changeset
|
265 sysDefines.add("WIN32"); |
1408
0ba67bb5392c
added c1x build directory, added MSVC Win64 project support
lstadler
parents:
844
diff
changeset
|
266 } else { |
2184
5d801e6b9a80
Imported build system changes from other repository.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
2044
diff
changeset
|
267 sysDefines.add("_AMD64_"); |
5d801e6b9a80
Imported build system changes from other repository.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
2044
diff
changeset
|
268 sysDefines.add("AMD64"); |
5d801e6b9a80
Imported build system changes from other repository.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
2044
diff
changeset
|
269 sysDefines.add("_WIN64"); |
5d801e6b9a80
Imported build system changes from other repository.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
2044
diff
changeset
|
270 sysDefines.add("_LP64"); |
5d801e6b9a80
Imported build system changes from other repository.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
2044
diff
changeset
|
271 if (System.getenv("MSC_VER") != null) |
5d801e6b9a80
Imported build system changes from other repository.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
2044
diff
changeset
|
272 sysDefines.add("MSC_VER=" + System.getenv("MSC_VER")); |
1408
0ba67bb5392c
added c1x build directory, added MSVC Win64 project support
lstadler
parents:
844
diff
changeset
|
273 sysDefines.add("HOTSPOT_LIB_ARCH=\\\"amd64\\\""); |
0ba67bb5392c
added c1x build directory, added MSVC Win64 project support
lstadler
parents:
844
diff
changeset
|
274 } |
2184
5d801e6b9a80
Imported build system changes from other repository.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
2044
diff
changeset
|
275 |
0 | 276 sysDefines.add("_WINDOWS"); |
2233
15d6977f04b0
7017824: Add support for creating 64-bit Visual Studio projects
sla
parents:
2027
diff
changeset
|
277 sysDefines.add("HOTSPOT_BUILD_USER=\\\""+System.getProperty("user.name")+"\\\""); |
0 | 278 sysDefines.add("HOTSPOT_BUILD_TARGET=\\\""+get("Build")+"\\\""); |
279 sysDefines.add("_JNI_IMPLEMENTATION_"); | |
2233
15d6977f04b0
7017824: Add support for creating 64-bit Visual Studio projects
sla
parents:
2027
diff
changeset
|
280 if (vars.get("PlatformName").equals("Win32")) { |
15d6977f04b0
7017824: Add support for creating 64-bit Visual Studio projects
sla
parents:
2027
diff
changeset
|
281 sysDefines.add("HOTSPOT_LIB_ARCH=\\\"i386\\\""); |
15d6977f04b0
7017824: Add support for creating 64-bit Visual Studio projects
sla
parents:
2027
diff
changeset
|
282 } else { |
15d6977f04b0
7017824: Add support for creating 64-bit Visual Studio projects
sla
parents:
2027
diff
changeset
|
283 sysDefines.add("HOTSPOT_LIB_ARCH=\\\"amd64\\\""); |
15d6977f04b0
7017824: Add support for creating 64-bit Visual Studio projects
sla
parents:
2027
diff
changeset
|
284 } |
0 | 285 |
286 sysDefines.addAll(defines); | |
287 | |
288 put("Define", sysDefines); | |
289 } | |
290 | |
291 String get(String key) { | |
292 return (String)vars.get(key); | |
293 } | |
294 | |
295 Vector getV(String key) { | |
296 return (Vector)vars.get(key); | |
297 } | |
298 | |
299 Object getO(String key) { | |
300 return vars.get(key); | |
301 } | |
302 | |
303 Hashtable getH(String key) { | |
304 return (Hashtable)vars.get(key); | |
305 } | |
306 | |
307 Object getFieldInContext(String field) { | |
308 for (int i=0; i<context.length; i++) { | |
309 Object rv = getField(context[i], field); | |
310 if (rv != null) { | |
311 return rv; | |
312 } | |
313 } | |
314 return null; | |
315 } | |
316 | |
317 Object lookupHashFieldInContext(String field, String key) { | |
318 for (int i=0; i<context.length; i++) { | |
319 Hashtable ht = (Hashtable)getField(context[i], field); | |
320 if (ht != null) { | |
321 Object rv = ht.get(key); | |
322 if (rv != null) { | |
323 return rv; | |
324 } | |
325 } | |
326 } | |
327 return null; | |
328 } | |
329 | |
330 void put(String key, String value) { | |
331 vars.put(key, value); | |
332 } | |
333 | |
334 void put(String key, Vector vvalue) { | |
335 vars.put(key, vvalue); | |
336 } | |
337 | |
338 void add(String key, Vector vvalue) { | |
339 getV(key).addAll(vvalue); | |
340 } | |
341 | |
342 String flavour() { | |
343 return get("Flavour"); | |
344 } | |
345 | |
346 String build() { | |
347 return get("Build"); | |
348 } | |
349 | |
2184
5d801e6b9a80
Imported build system changes from other repository.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
2044
diff
changeset
|
350 String outputDir() { |
5d801e6b9a80
Imported build system changes from other repository.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
2044
diff
changeset
|
351 return get("OutputDir"); |
5d801e6b9a80
Imported build system changes from other repository.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
2044
diff
changeset
|
352 } |
5d801e6b9a80
Imported build system changes from other repository.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
2044
diff
changeset
|
353 |
0 | 354 Object getSpecificField(String field) { |
355 return getField(get("Id"), field); | |
356 } | |
357 | |
358 void putSpecificField(String field, Object value) { | |
359 putField(get("Id"), field, value); | |
360 } | |
361 | |
362 void collectRelevantVectors(Vector rv, String field) { | |
363 for (int i = 0; i < context.length; i++) { | |
364 Vector v = getFieldVector(context[i], field); | |
365 if (v != null) { | |
366 for (Iterator j=v.iterator(); j.hasNext(); ) { | |
367 String val = (String)j.next(); | |
368 rv.add(expandFormat(val)); | |
369 } | |
370 } | |
371 } | |
372 } | |
373 | |
374 void collectRelevantHashes(Hashtable rv, String field) { | |
375 for (int i = 0; i < context.length; i++) { | |
376 Hashtable v = (Hashtable)getField(context[i], field); | |
377 if (v != null) { | |
378 for (Enumeration e=v.keys(); e.hasMoreElements(); ) { | |
379 String key = (String)e.nextElement(); | |
380 String val = (String)v.get(key); | |
381 addTo(rv, key, val); | |
382 } | |
383 } | |
384 } | |
385 } | |
386 | |
387 | |
388 Vector getDefines() { | |
389 Vector rv = new Vector(); | |
390 collectRelevantVectors(rv, "Define"); | |
391 return rv; | |
392 } | |
393 | |
394 Vector getIncludes() { | |
395 Vector rv = new Vector(); | |
396 | |
397 collectRelevantVectors(rv, "AbsoluteInclude"); | |
398 | |
1972 | 399 rv.addAll(getSourceIncludes()); |
400 | |
401 return rv; | |
402 } | |
403 | |
404 private Vector getSourceIncludes() { | |
405 Vector rv = new Vector(); | |
0 | 406 Vector ri = new Vector(); |
407 String sourceBase = getFieldString(null, "SourceBase"); | |
408 collectRelevantVectors(ri, "RelativeInclude"); | |
409 for (Iterator i = ri.iterator(); i.hasNext(); ) { | |
410 String f = (String)i.next(); | |
411 rv.add(sourceBase + Util.sep + f); | |
412 } | |
413 return rv; | |
414 } | |
415 | |
416 static Hashtable cfgData = new Hashtable(); | |
417 static Hashtable globalData = new Hashtable(); | |
418 | |
419 static boolean appliesToTieredBuild(String cfg) { | |
420 return (cfg != null && | |
421 (cfg.startsWith("compiler1") || | |
422 cfg.startsWith("compiler2"))); | |
423 } | |
424 | |
1972 | 425 // Filters out the IgnoreFile and IgnorePaths since they are |
426 // handled specially for tiered builds. | |
0 | 427 static boolean appliesToTieredBuild(String cfg, String key) { |
1972 | 428 return (appliesToTieredBuild(cfg))&& (key != null && !key.startsWith("Ignore")); |
0 | 429 } |
430 | |
431 static String getTieredBuildCfg(String cfg) { | |
432 assert appliesToTieredBuild(cfg) : "illegal configuration " + cfg; | |
433 return "tiered" + cfg.substring(9); | |
434 } | |
435 | |
436 static Object getField(String cfg, String field) { | |
437 if (cfg == null) { | |
438 return globalData.get(field); | |
439 } | |
440 | |
441 Hashtable ht = (Hashtable)cfgData.get(cfg); | |
442 return ht == null ? null : ht.get(field); | |
443 } | |
444 | |
445 static String getFieldString(String cfg, String field) { | |
446 return (String)getField(cfg, field); | |
447 } | |
448 | |
449 static Vector getFieldVector(String cfg, String field) { | |
450 return (Vector)getField(cfg, field); | |
451 } | |
452 | |
453 static void putField(String cfg, String field, Object value) { | |
454 putFieldImpl(cfg, field, value); | |
455 if (appliesToTieredBuild(cfg, field)) { | |
456 putFieldImpl(getTieredBuildCfg(cfg), field, value); | |
457 } | |
458 } | |
459 | |
460 private static void putFieldImpl(String cfg, String field, Object value) { | |
461 if (cfg == null) { | |
462 globalData.put(field, value); | |
463 return; | |
464 } | |
465 | |
466 Hashtable ht = (Hashtable)cfgData.get(cfg); | |
467 if (ht == null) { | |
468 ht = new Hashtable(); | |
469 cfgData.put(cfg, ht); | |
470 } | |
471 | |
472 ht.put(field, value); | |
473 } | |
474 | |
475 static Object getFieldHash(String cfg, String field, String name) { | |
476 Hashtable ht = (Hashtable)getField(cfg, field); | |
477 | |
478 return ht == null ? null : ht.get(name); | |
479 } | |
480 | |
481 static void putFieldHash(String cfg, String field, String name, Object val) { | |
482 putFieldHashImpl(cfg, field, name, val); | |
1972 | 483 if (appliesToTieredBuild(cfg, field)) { |
0 | 484 putFieldHashImpl(getTieredBuildCfg(cfg), field, name, val); |
485 } | |
486 } | |
487 | |
488 private static void putFieldHashImpl(String cfg, String field, String name, Object val) { | |
489 Hashtable ht = (Hashtable)getField(cfg, field); | |
490 | |
491 if (ht == null) { | |
492 ht = new Hashtable(); | |
493 putFieldImpl(cfg, field, ht); | |
494 } | |
495 | |
496 ht.put(name, val); | |
497 } | |
498 | |
499 static void addFieldVector(String cfg, String field, String element) { | |
500 addFieldVectorImpl(cfg, field, element); | |
1972 | 501 if (appliesToTieredBuild(cfg, field)) { |
0 | 502 addFieldVectorImpl(getTieredBuildCfg(cfg), field, element); |
503 } | |
504 } | |
505 | |
506 private static void addFieldVectorImpl(String cfg, String field, String element) { | |
507 Vector v = (Vector)getField(cfg, field); | |
508 | |
509 if (v == null) { | |
510 v = new Vector(); | |
511 putFieldImpl(cfg, field, v); | |
512 } | |
513 | |
514 v.add(element); | |
515 } | |
516 | |
517 String expandFormat(String format) { | |
518 if (format == null) { | |
519 return null; | |
520 } | |
521 | |
522 if (format.indexOf('%') == -1) { | |
523 return format; | |
524 } | |
525 | |
526 StringBuffer sb = new StringBuffer(); | |
527 int len = format.length(); | |
528 for (int i=0; i<len; i++) { | |
529 char ch = format.charAt(i); | |
530 if (ch == '%') { | |
531 char ch1 = format.charAt(i+1); | |
532 switch (ch1) { | |
533 case '%': | |
534 sb.append(ch1); | |
535 break; | |
536 case 'b': | |
537 sb.append(build()); | |
538 break; | |
539 case 'f': | |
540 sb.append(flavour()); | |
541 break; | |
2184
5d801e6b9a80
Imported build system changes from other repository.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
2044
diff
changeset
|
542 case 'o': |
5d801e6b9a80
Imported build system changes from other repository.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
2044
diff
changeset
|
543 sb.append(outputDir()); |
5d801e6b9a80
Imported build system changes from other repository.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents:
2044
diff
changeset
|
544 break; |
0 | 545 default: |
546 sb.append(ch); | |
547 sb.append(ch1); | |
548 } | |
549 i++; | |
550 } else { | |
551 sb.append(ch); | |
552 } | |
553 } | |
554 | |
555 return sb.toString(); | |
556 } | |
557 } | |
558 | |
559 abstract class GenericDebugConfig extends BuildConfig { | |
560 abstract String getOptFlag(); | |
561 | |
562 protected void init(Vector includes, Vector defines) { | |
563 defines.add("_DEBUG"); | |
564 defines.add("ASSERT"); | |
565 | |
566 super.init(includes, defines); | |
567 | |
568 getV("CompilerFlags").addAll(getCI().getDebugCompilerFlags(getOptFlag())); | |
569 getV("LinkerFlags").addAll(getCI().getDebugLinkerFlags()); | |
570 } | |
571 } | |
572 | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
573 abstract class GenericDebugNonKernelConfig extends GenericDebugConfig { |
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
574 protected void init(Vector includes, Vector defines) { |
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
575 super.init(includes, defines); |
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
576 getCI().getAdditionalNonKernelLinkerFlags(getV("LinkerFlags")); |
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
577 } |
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
578 } |
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
579 |
4572
76841bdd5f3e
(Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents:
4475
diff
changeset
|
580 class GraalDebugConfig extends GenericDebugNonKernelConfig { |
76841bdd5f3e
(Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents:
4475
diff
changeset
|
581 String getOptFlag() { |
76841bdd5f3e
(Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents:
4475
diff
changeset
|
582 return getCI().getNoOptFlag(); |
76841bdd5f3e
(Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents:
4475
diff
changeset
|
583 } |
76841bdd5f3e
(Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents:
4475
diff
changeset
|
584 |
76841bdd5f3e
(Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents:
4475
diff
changeset
|
585 GraalDebugConfig() { |
76841bdd5f3e
(Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents:
4475
diff
changeset
|
586 initNames("graal", "debug", "jvm.dll"); |
76841bdd5f3e
(Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents:
4475
diff
changeset
|
587 init(getIncludes(), getDefines()); |
76841bdd5f3e
(Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents:
4475
diff
changeset
|
588 } |
76841bdd5f3e
(Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents:
4475
diff
changeset
|
589 } |
76841bdd5f3e
(Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents:
4475
diff
changeset
|
590 |
76841bdd5f3e
(Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents:
4475
diff
changeset
|
591 class GraalFastDebugConfig extends GenericDebugNonKernelConfig { |
76841bdd5f3e
(Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents:
4475
diff
changeset
|
592 String getOptFlag() { |
76841bdd5f3e
(Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents:
4475
diff
changeset
|
593 return getCI().getOptFlag(); |
76841bdd5f3e
(Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents:
4475
diff
changeset
|
594 } |
76841bdd5f3e
(Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents:
4475
diff
changeset
|
595 |
76841bdd5f3e
(Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents:
4475
diff
changeset
|
596 GraalFastDebugConfig() { |
76841bdd5f3e
(Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents:
4475
diff
changeset
|
597 initNames("graal", "fastdebug", "jvm.dll"); |
76841bdd5f3e
(Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents:
4475
diff
changeset
|
598 init(getIncludes(), getDefines()); |
76841bdd5f3e
(Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents:
4475
diff
changeset
|
599 } |
76841bdd5f3e
(Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents:
4475
diff
changeset
|
600 } |
76841bdd5f3e
(Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents:
4475
diff
changeset
|
601 |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
602 class C1DebugConfig extends GenericDebugNonKernelConfig { |
0 | 603 String getOptFlag() { |
604 return getCI().getNoOptFlag(); | |
605 } | |
606 | |
607 C1DebugConfig() { | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
608 initNames("compiler1", "debug", "jvm.dll"); |
0 | 609 init(getIncludes(), getDefines()); |
610 } | |
611 } | |
612 | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
613 class C1FastDebugConfig extends GenericDebugNonKernelConfig { |
0 | 614 String getOptFlag() { |
615 return getCI().getOptFlag(); | |
616 } | |
617 | |
618 C1FastDebugConfig() { | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
619 initNames("compiler1", "fastdebug", "jvm.dll"); |
0 | 620 init(getIncludes(), getDefines()); |
621 } | |
622 } | |
623 | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
624 class C2DebugConfig extends GenericDebugNonKernelConfig { |
0 | 625 String getOptFlag() { |
626 return getCI().getNoOptFlag(); | |
627 } | |
628 | |
629 C2DebugConfig() { | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
630 initNames("compiler2", "debug", "jvm.dll"); |
0 | 631 init(getIncludes(), getDefines()); |
632 } | |
633 } | |
634 | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
635 class C2FastDebugConfig extends GenericDebugNonKernelConfig { |
0 | 636 String getOptFlag() { |
637 return getCI().getOptFlag(); | |
638 } | |
639 | |
640 C2FastDebugConfig() { | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
641 initNames("compiler2", "fastdebug", "jvm.dll"); |
0 | 642 init(getIncludes(), getDefines()); |
643 } | |
644 } | |
645 | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
646 class TieredDebugConfig extends GenericDebugNonKernelConfig { |
0 | 647 String getOptFlag() { |
648 return getCI().getNoOptFlag(); | |
649 } | |
650 | |
651 TieredDebugConfig() { | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
652 initNames("tiered", "debug", "jvm.dll"); |
0 | 653 init(getIncludes(), getDefines()); |
654 } | |
655 } | |
656 | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
657 class TieredFastDebugConfig extends GenericDebugNonKernelConfig { |
0 | 658 String getOptFlag() { |
659 return getCI().getOptFlag(); | |
660 } | |
661 | |
662 TieredFastDebugConfig() { | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
663 initNames("tiered", "fastdebug", "jvm.dll"); |
0 | 664 init(getIncludes(), getDefines()); |
665 } | |
666 } | |
667 | |
668 | |
669 abstract class ProductConfig extends BuildConfig { | |
670 protected void init(Vector includes, Vector defines) { | |
671 defines.add("NDEBUG"); | |
672 defines.add("PRODUCT"); | |
673 | |
674 super.init(includes, defines); | |
675 | |
676 getV("CompilerFlags").addAll(getCI().getProductCompilerFlags()); | |
677 getV("LinkerFlags").addAll(getCI().getProductLinkerFlags()); | |
678 } | |
679 } | |
680 | |
4572
76841bdd5f3e
(Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents:
4475
diff
changeset
|
681 class GraalProductConfig extends ProductConfig { |
76841bdd5f3e
(Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents:
4475
diff
changeset
|
682 GraalProductConfig() { |
76841bdd5f3e
(Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents:
4475
diff
changeset
|
683 initNames("graal", "product", "jvm.dll"); |
76841bdd5f3e
(Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents:
4475
diff
changeset
|
684 init(getIncludes(), getDefines()); |
76841bdd5f3e
(Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents:
4475
diff
changeset
|
685 } |
76841bdd5f3e
(Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents:
4475
diff
changeset
|
686 } |
76841bdd5f3e
(Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents:
4475
diff
changeset
|
687 |
0 | 688 class C1ProductConfig extends ProductConfig { |
689 C1ProductConfig() { | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
690 initNames("compiler1", "product", "jvm.dll"); |
0 | 691 init(getIncludes(), getDefines()); |
692 } | |
693 } | |
694 | |
695 class C2ProductConfig extends ProductConfig { | |
696 C2ProductConfig() { | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
697 initNames("compiler2", "product", "jvm.dll"); |
0 | 698 init(getIncludes(), getDefines()); |
699 } | |
700 } | |
701 | |
702 class TieredProductConfig extends ProductConfig { | |
703 TieredProductConfig() { | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
704 initNames("tiered", "product", "jvm.dll"); |
0 | 705 init(getIncludes(), getDefines()); |
706 } | |
707 } | |
708 | |
709 | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
710 class CoreDebugConfig extends GenericDebugNonKernelConfig { |
0 | 711 String getOptFlag() { |
712 return getCI().getNoOptFlag(); | |
713 } | |
714 | |
715 CoreDebugConfig() { | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
716 initNames("core", "debug", "jvm.dll"); |
0 | 717 init(getIncludes(), getDefines()); |
718 } | |
719 } | |
720 | |
721 | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
722 class CoreFastDebugConfig extends GenericDebugNonKernelConfig { |
0 | 723 String getOptFlag() { |
724 return getCI().getOptFlag(); | |
725 } | |
726 | |
727 CoreFastDebugConfig() { | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
728 initNames("core", "fastdebug", "jvm.dll"); |
0 | 729 init(getIncludes(), getDefines()); |
730 } | |
731 } | |
732 | |
733 | |
734 class CoreProductConfig extends ProductConfig { | |
735 CoreProductConfig() { | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
736 initNames("core", "product", "jvm.dll"); |
0 | 737 init(getIncludes(), getDefines()); |
738 } | |
739 } | |
740 | |
741 class KernelDebugConfig extends GenericDebugConfig { | |
742 String getOptFlag() { | |
743 return getCI().getNoOptFlag(); | |
744 } | |
745 | |
746 KernelDebugConfig() { | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
747 initNames("kernel", "debug", "jvm.dll"); |
0 | 748 init(getIncludes(), getDefines()); |
749 } | |
750 } | |
751 | |
752 | |
753 class KernelFastDebugConfig extends GenericDebugConfig { | |
754 String getOptFlag() { | |
755 return getCI().getOptFlag(); | |
756 } | |
757 | |
758 KernelFastDebugConfig() { | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
759 initNames("kernel", "fastdebug", "jvm.dll"); |
0 | 760 init(getIncludes(), getDefines()); |
761 } | |
762 } | |
763 | |
764 | |
765 class KernelProductConfig extends ProductConfig { | |
766 KernelProductConfig() { | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
767 initNames("kernel", "product", "jvm.dll"); |
0 | 768 init(getIncludes(), getDefines()); |
769 } | |
770 } | |
771 abstract class CompilerInterface { | |
772 abstract Vector getBaseCompilerFlags(Vector defines, Vector includes, String outDir); | |
2233
15d6977f04b0
7017824: Add support for creating 64-bit Visual Studio projects
sla
parents:
2027
diff
changeset
|
773 abstract Vector getBaseLinkerFlags(String outDir, String outDll, String platformName); |
0 | 774 abstract Vector getDebugCompilerFlags(String opt); |
775 abstract Vector getDebugLinkerFlags(); | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
776 abstract void getAdditionalNonKernelLinkerFlags(Vector rv); |
0 | 777 abstract Vector getProductCompilerFlags(); |
778 abstract Vector getProductLinkerFlags(); | |
779 abstract String getOptFlag(); | |
780 abstract String getNoOptFlag(); | |
2233
15d6977f04b0
7017824: Add support for creating 64-bit Visual Studio projects
sla
parents:
2027
diff
changeset
|
781 abstract String makeCfgName(String flavourBuild, String platformName); |
0 | 782 |
783 void addAttr(Vector receiver, String attr, String value) { | |
784 receiver.add(attr); receiver.add(value); | |
785 } | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
786 void extAttr(Vector receiver, String attr, String value) { |
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
787 int attr_pos=receiver.indexOf(attr) ; |
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
788 if ( attr_pos == -1) { |
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
789 // If attr IS NOT present in the Vector - add it |
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
790 receiver.add(attr); receiver.add(value); |
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
791 } else { |
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
792 // If attr IS present in the Vector - append value to it |
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
793 receiver.set(attr_pos+1,receiver.get(attr_pos+1)+value); |
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
794 } |
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
795 } |
0 | 796 } |