Mercurial > hg > truffle
annotate src/share/tools/ProjectCreator/BuildConfig.java @ 10393:603ca7e51354
8010460: Interpreter on some platforms loads ConstMethod::_max_stack and misses extra stack slots for JSR 292
Summary: ConstMethod::max_stack() doesn't account for JSR 292 appendix.
Reviewed-by: kvn
author | roland |
---|---|
date | Wed, 24 Apr 2013 11:49:38 +0200 |
parents | aabf54ccedb1 |
children | f2110083203d |
rev | line source |
---|---|
0 | 1 /* |
4878
2eeebe4b4213
7140909: Visual Studio project builds broken: need to define INCLUDE_TRACE
brutisso
parents:
2233
diff
changeset
|
2 * Copyright (c) 2005, 2012, 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 | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
25 import java.util.Enumeration; |
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
26 import java.util.Hashtable; |
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
27 import java.util.Vector; |
0 | 28 |
29 class BuildConfig { | |
6801 | 30 @SuppressWarnings("rawtypes") |
0 | 31 Hashtable vars; |
6801 | 32 Vector<String> basicNames, basicPaths; |
0 | 33 String[] context; |
34 | |
35 static CompilerInterface ci; | |
36 static CompilerInterface getCI() { | |
37 if (ci == null) { | |
38 String comp = (String)getField(null, "CompilerVersion"); | |
39 try { | |
40 ci = (CompilerInterface)Class.forName("CompilerInterface" + comp).newInstance(); | |
41 } catch (Exception cnfe) { | |
42 System.err.println("Cannot find support for compiler " + comp); | |
43 throw new RuntimeException(cnfe.toString()); | |
44 } | |
45 } | |
46 return ci; | |
47 } | |
48 | |
6801 | 49 @SuppressWarnings("rawtypes") |
0 | 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"); | |
6801 | 66 String buildSpace = getFieldString(null, "BuildSpace"); |
0 | 67 String outDir = buildBase; |
10277 | 68 String jdkTargetRoot = getFieldString(null, "JdkTargetRoot"); |
0 | 69 |
70 put("Id", flavourBuild); | |
71 put("OutputDir", outDir); | |
72 put("SourceBase", sourceBase); | |
73 put("BuildBase", buildBase); | |
6801 | 74 put("BuildSpace", buildSpace); |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
75 put("OutputDll", outDir + Util.sep + outDll); |
10277 | 76 put("JdkTargetRoot", jdkTargetRoot); |
0 | 77 |
78 context = new String [] {flavourBuild, flavour, build, null}; | |
79 } | |
80 | |
6801 | 81 protected void init(Vector<String> includes, Vector<String> defines) { |
0 | 82 initDefaultDefines(defines); |
83 initDefaultCompilerFlags(includes); | |
84 initDefaultLinkerFlags(); | |
6801 | 85 //handleDB(); |
0 | 86 } |
87 | |
88 | |
6801 | 89 protected void initDefaultCompilerFlags(Vector<String> includes) { |
0 | 90 Vector compilerFlags = new Vector(); |
91 | |
92 compilerFlags.addAll(getCI().getBaseCompilerFlags(getV("Define"), | |
93 includes, | |
94 get("OutputDir"))); | |
95 | |
96 put("CompilerFlags", compilerFlags); | |
97 } | |
98 | |
99 protected void initDefaultLinkerFlags() { | |
100 Vector linkerFlags = new Vector(); | |
101 | |
2233
15d6977f04b0
7017824: Add support for creating 64-bit Visual Studio projects
sla
parents:
2027
diff
changeset
|
102 linkerFlags.addAll(getCI().getBaseLinkerFlags( get("OutputDir"), get("OutputDll"), get("PlatformName"))); |
0 | 103 |
104 put("LinkerFlags", linkerFlags); | |
105 } | |
106 | |
6801 | 107 public boolean matchesIgnoredPath(String path) { |
108 Vector<String> rv = new Vector<String>(); | |
1972 | 109 collectRelevantVectors(rv, "IgnorePath"); |
6801 | 110 for (String pathPart : rv) { |
111 if (path.contains(pathPart)) { | |
1972 | 112 return true; |
113 } | |
114 } | |
115 return false; | |
116 } | |
117 | |
6801 | 118 public boolean matchesHidePath(String path) { |
119 Vector<String> rv = new Vector<String>(); | |
120 collectRelevantVectors(rv, "HidePath"); | |
121 for (String pathPart : rv) { | |
122 if (path.contains(Util.normalize(pathPart))) { | |
123 return true; | |
124 } | |
125 } | |
126 return false; | |
127 } | |
128 | |
129 public Vector<String> matchesAdditionalGeneratedPath(String fullPath) { | |
130 Vector<String> rv = new Vector<String>(); | |
131 Hashtable<String, String> v = (Hashtable<String, String>)BuildConfig.getField(this.toString(), "AdditionalGeneratedFile"); | |
132 if (v != null) { | |
133 for (Enumeration<String> e=v.keys(); e.hasMoreElements(); ) { | |
134 String key = e.nextElement(); | |
135 String val = v.get(key); | |
136 | |
137 if (fullPath.endsWith(expandFormat(key))) { | |
138 rv.add(expandFormat(val)); | |
0 | 139 } |
140 } | |
141 } | |
6801 | 142 return rv; |
0 | 143 } |
144 | |
145 void addTo(Hashtable ht, String key, String value) { | |
146 ht.put(expandFormat(key), expandFormat(value)); | |
147 } | |
148 | |
149 void initDefaultDefines(Vector defines) { | |
150 Vector sysDefines = new Vector(); | |
151 sysDefines.add("WIN32"); | |
152 sysDefines.add("_WINDOWS"); | |
2233
15d6977f04b0
7017824: Add support for creating 64-bit Visual Studio projects
sla
parents:
2027
diff
changeset
|
153 sysDefines.add("HOTSPOT_BUILD_USER=\\\""+System.getProperty("user.name")+"\\\""); |
0 | 154 sysDefines.add("HOTSPOT_BUILD_TARGET=\\\""+get("Build")+"\\\""); |
4878
2eeebe4b4213
7140909: Visual Studio project builds broken: need to define INCLUDE_TRACE
brutisso
parents:
2233
diff
changeset
|
155 sysDefines.add("INCLUDE_TRACE"); |
0 | 156 sysDefines.add("_JNI_IMPLEMENTATION_"); |
2233
15d6977f04b0
7017824: Add support for creating 64-bit Visual Studio projects
sla
parents:
2027
diff
changeset
|
157 if (vars.get("PlatformName").equals("Win32")) { |
15d6977f04b0
7017824: Add support for creating 64-bit Visual Studio projects
sla
parents:
2027
diff
changeset
|
158 sysDefines.add("HOTSPOT_LIB_ARCH=\\\"i386\\\""); |
15d6977f04b0
7017824: Add support for creating 64-bit Visual Studio projects
sla
parents:
2027
diff
changeset
|
159 } else { |
15d6977f04b0
7017824: Add support for creating 64-bit Visual Studio projects
sla
parents:
2027
diff
changeset
|
160 sysDefines.add("HOTSPOT_LIB_ARCH=\\\"amd64\\\""); |
15d6977f04b0
7017824: Add support for creating 64-bit Visual Studio projects
sla
parents:
2027
diff
changeset
|
161 } |
0 | 162 |
163 sysDefines.addAll(defines); | |
164 | |
165 put("Define", sysDefines); | |
166 } | |
167 | |
168 String get(String key) { | |
169 return (String)vars.get(key); | |
170 } | |
171 | |
172 Vector getV(String key) { | |
173 return (Vector)vars.get(key); | |
174 } | |
175 | |
176 Object getO(String key) { | |
177 return vars.get(key); | |
178 } | |
179 | |
180 Hashtable getH(String key) { | |
181 return (Hashtable)vars.get(key); | |
182 } | |
183 | |
184 Object getFieldInContext(String field) { | |
185 for (int i=0; i<context.length; i++) { | |
186 Object rv = getField(context[i], field); | |
187 if (rv != null) { | |
188 return rv; | |
189 } | |
190 } | |
191 return null; | |
192 } | |
193 | |
194 Object lookupHashFieldInContext(String field, String key) { | |
195 for (int i=0; i<context.length; i++) { | |
196 Hashtable ht = (Hashtable)getField(context[i], field); | |
197 if (ht != null) { | |
198 Object rv = ht.get(key); | |
199 if (rv != null) { | |
200 return rv; | |
201 } | |
202 } | |
203 } | |
204 return null; | |
205 } | |
206 | |
207 void put(String key, String value) { | |
208 vars.put(key, value); | |
209 } | |
210 | |
211 void put(String key, Vector vvalue) { | |
212 vars.put(key, vvalue); | |
213 } | |
214 | |
215 void add(String key, Vector vvalue) { | |
216 getV(key).addAll(vvalue); | |
217 } | |
218 | |
219 String flavour() { | |
220 return get("Flavour"); | |
221 } | |
222 | |
223 String build() { | |
224 return get("Build"); | |
225 } | |
226 | |
227 Object getSpecificField(String field) { | |
228 return getField(get("Id"), field); | |
229 } | |
230 | |
231 void putSpecificField(String field, Object value) { | |
232 putField(get("Id"), field, value); | |
233 } | |
234 | |
235 void collectRelevantVectors(Vector rv, String field) { | |
6801 | 236 for (String ctx : context) { |
237 Vector<String> v = getFieldVector(ctx, field); | |
0 | 238 if (v != null) { |
6801 | 239 for (String val : v) { |
240 rv.add(expandFormat(val).replace('/', '\\')); | |
0 | 241 } |
242 } | |
243 } | |
244 } | |
245 | |
246 void collectRelevantHashes(Hashtable rv, String field) { | |
6801 | 247 for (String ctx : context) { |
248 Hashtable v = (Hashtable)getField(ctx, field); | |
0 | 249 if (v != null) { |
250 for (Enumeration e=v.keys(); e.hasMoreElements(); ) { | |
251 String key = (String)e.nextElement(); | |
252 String val = (String)v.get(key); | |
253 addTo(rv, key, val); | |
254 } | |
255 } | |
256 } | |
257 } | |
258 | |
259 | |
260 Vector getDefines() { | |
261 Vector rv = new Vector(); | |
262 collectRelevantVectors(rv, "Define"); | |
263 return rv; | |
264 } | |
265 | |
266 Vector getIncludes() { | |
267 Vector rv = new Vector(); | |
268 collectRelevantVectors(rv, "AbsoluteInclude"); | |
1972 | 269 rv.addAll(getSourceIncludes()); |
270 return rv; | |
271 } | |
272 | |
273 private Vector getSourceIncludes() { | |
6801 | 274 Vector<String> rv = new Vector<String>(); |
275 Vector<String> ri = new Vector<String>(); | |
0 | 276 String sourceBase = getFieldString(null, "SourceBase"); |
277 collectRelevantVectors(ri, "RelativeInclude"); | |
6801 | 278 for (String f : ri) { |
0 | 279 rv.add(sourceBase + Util.sep + f); |
280 } | |
281 return rv; | |
282 } | |
283 | |
284 static Hashtable cfgData = new Hashtable(); | |
285 static Hashtable globalData = new Hashtable(); | |
286 | |
287 static boolean appliesToTieredBuild(String cfg) { | |
288 return (cfg != null && | |
289 (cfg.startsWith("compiler1") || | |
290 cfg.startsWith("compiler2"))); | |
291 } | |
292 | |
1972 | 293 // Filters out the IgnoreFile and IgnorePaths since they are |
294 // handled specially for tiered builds. | |
0 | 295 static boolean appliesToTieredBuild(String cfg, String key) { |
1972 | 296 return (appliesToTieredBuild(cfg))&& (key != null && !key.startsWith("Ignore")); |
0 | 297 } |
298 | |
299 static String getTieredBuildCfg(String cfg) { | |
300 assert appliesToTieredBuild(cfg) : "illegal configuration " + cfg; | |
301 return "tiered" + cfg.substring(9); | |
302 } | |
303 | |
304 static Object getField(String cfg, String field) { | |
305 if (cfg == null) { | |
306 return globalData.get(field); | |
307 } | |
308 | |
309 Hashtable ht = (Hashtable)cfgData.get(cfg); | |
310 return ht == null ? null : ht.get(field); | |
311 } | |
312 | |
313 static String getFieldString(String cfg, String field) { | |
314 return (String)getField(cfg, field); | |
315 } | |
316 | |
317 static Vector getFieldVector(String cfg, String field) { | |
318 return (Vector)getField(cfg, field); | |
319 } | |
320 | |
321 static void putField(String cfg, String field, Object value) { | |
322 putFieldImpl(cfg, field, value); | |
323 if (appliesToTieredBuild(cfg, field)) { | |
324 putFieldImpl(getTieredBuildCfg(cfg), field, value); | |
325 } | |
326 } | |
327 | |
328 private static void putFieldImpl(String cfg, String field, Object value) { | |
329 if (cfg == null) { | |
330 globalData.put(field, value); | |
331 return; | |
332 } | |
333 | |
334 Hashtable ht = (Hashtable)cfgData.get(cfg); | |
335 if (ht == null) { | |
336 ht = new Hashtable(); | |
337 cfgData.put(cfg, ht); | |
338 } | |
339 | |
340 ht.put(field, value); | |
341 } | |
342 | |
343 static Object getFieldHash(String cfg, String field, String name) { | |
344 Hashtable ht = (Hashtable)getField(cfg, field); | |
345 | |
346 return ht == null ? null : ht.get(name); | |
347 } | |
348 | |
349 static void putFieldHash(String cfg, String field, String name, Object val) { | |
350 putFieldHashImpl(cfg, field, name, val); | |
1972 | 351 if (appliesToTieredBuild(cfg, field)) { |
0 | 352 putFieldHashImpl(getTieredBuildCfg(cfg), field, name, val); |
353 } | |
354 } | |
355 | |
356 private static void putFieldHashImpl(String cfg, String field, String name, Object val) { | |
357 Hashtable ht = (Hashtable)getField(cfg, field); | |
358 | |
359 if (ht == null) { | |
360 ht = new Hashtable(); | |
361 putFieldImpl(cfg, field, ht); | |
362 } | |
363 | |
364 ht.put(name, val); | |
365 } | |
366 | |
367 static void addFieldVector(String cfg, String field, String element) { | |
368 addFieldVectorImpl(cfg, field, element); | |
1972 | 369 if (appliesToTieredBuild(cfg, field)) { |
0 | 370 addFieldVectorImpl(getTieredBuildCfg(cfg), field, element); |
371 } | |
372 } | |
373 | |
374 private static void addFieldVectorImpl(String cfg, String field, String element) { | |
375 Vector v = (Vector)getField(cfg, field); | |
376 | |
377 if (v == null) { | |
378 v = new Vector(); | |
379 putFieldImpl(cfg, field, v); | |
380 } | |
381 | |
382 v.add(element); | |
383 } | |
384 | |
385 String expandFormat(String format) { | |
386 if (format == null) { | |
387 return null; | |
388 } | |
389 | |
390 if (format.indexOf('%') == -1) { | |
391 return format; | |
392 } | |
393 | |
394 StringBuffer sb = new StringBuffer(); | |
395 int len = format.length(); | |
396 for (int i=0; i<len; i++) { | |
397 char ch = format.charAt(i); | |
398 if (ch == '%') { | |
399 char ch1 = format.charAt(i+1); | |
400 switch (ch1) { | |
401 case '%': | |
402 sb.append(ch1); | |
403 break; | |
404 case 'b': | |
405 sb.append(build()); | |
406 break; | |
407 case 'f': | |
408 sb.append(flavour()); | |
409 break; | |
410 default: | |
411 sb.append(ch); | |
412 sb.append(ch1); | |
413 } | |
414 i++; | |
415 } else { | |
416 sb.append(ch); | |
417 } | |
418 } | |
419 | |
420 return sb.toString(); | |
421 } | |
422 } | |
423 | |
424 abstract class GenericDebugConfig extends BuildConfig { | |
425 abstract String getOptFlag(); | |
426 | |
427 protected void init(Vector includes, Vector defines) { | |
428 defines.add("_DEBUG"); | |
429 defines.add("ASSERT"); | |
430 | |
431 super.init(includes, defines); | |
432 | |
433 getV("CompilerFlags").addAll(getCI().getDebugCompilerFlags(getOptFlag())); | |
434 getV("LinkerFlags").addAll(getCI().getDebugLinkerFlags()); | |
435 } | |
436 } | |
437 | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
438 abstract class GenericDebugNonKernelConfig extends GenericDebugConfig { |
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
439 protected void init(Vector includes, Vector defines) { |
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
440 super.init(includes, defines); |
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
441 getCI().getAdditionalNonKernelLinkerFlags(getV("LinkerFlags")); |
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
442 } |
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
443 } |
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
444 |
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
445 class C1DebugConfig extends GenericDebugNonKernelConfig { |
0 | 446 String getOptFlag() { |
447 return getCI().getNoOptFlag(); | |
448 } | |
449 | |
450 C1DebugConfig() { | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
451 initNames("compiler1", "debug", "jvm.dll"); |
0 | 452 init(getIncludes(), getDefines()); |
453 } | |
454 } | |
455 | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
456 class C1FastDebugConfig extends GenericDebugNonKernelConfig { |
0 | 457 String getOptFlag() { |
458 return getCI().getOptFlag(); | |
459 } | |
460 | |
461 C1FastDebugConfig() { | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
462 initNames("compiler1", "fastdebug", "jvm.dll"); |
0 | 463 init(getIncludes(), getDefines()); |
464 } | |
465 } | |
466 | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
467 class C2DebugConfig extends GenericDebugNonKernelConfig { |
0 | 468 String getOptFlag() { |
469 return getCI().getNoOptFlag(); | |
470 } | |
471 | |
472 C2DebugConfig() { | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
473 initNames("compiler2", "debug", "jvm.dll"); |
0 | 474 init(getIncludes(), getDefines()); |
475 } | |
476 } | |
477 | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
478 class C2FastDebugConfig extends GenericDebugNonKernelConfig { |
0 | 479 String getOptFlag() { |
480 return getCI().getOptFlag(); | |
481 } | |
482 | |
483 C2FastDebugConfig() { | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
484 initNames("compiler2", "fastdebug", "jvm.dll"); |
0 | 485 init(getIncludes(), getDefines()); |
486 } | |
487 } | |
488 | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
489 class TieredDebugConfig extends GenericDebugNonKernelConfig { |
0 | 490 String getOptFlag() { |
491 return getCI().getNoOptFlag(); | |
492 } | |
493 | |
494 TieredDebugConfig() { | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
495 initNames("tiered", "debug", "jvm.dll"); |
0 | 496 init(getIncludes(), getDefines()); |
497 } | |
498 } | |
499 | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
500 class TieredFastDebugConfig extends GenericDebugNonKernelConfig { |
0 | 501 String getOptFlag() { |
502 return getCI().getOptFlag(); | |
503 } | |
504 | |
505 TieredFastDebugConfig() { | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
506 initNames("tiered", "fastdebug", "jvm.dll"); |
0 | 507 init(getIncludes(), getDefines()); |
508 } | |
509 } | |
510 | |
511 abstract class ProductConfig extends BuildConfig { | |
512 protected void init(Vector includes, Vector defines) { | |
513 defines.add("NDEBUG"); | |
514 defines.add("PRODUCT"); | |
515 | |
516 super.init(includes, defines); | |
517 | |
518 getV("CompilerFlags").addAll(getCI().getProductCompilerFlags()); | |
519 getV("LinkerFlags").addAll(getCI().getProductLinkerFlags()); | |
520 } | |
521 } | |
522 | |
523 class C1ProductConfig extends ProductConfig { | |
524 C1ProductConfig() { | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
525 initNames("compiler1", "product", "jvm.dll"); |
0 | 526 init(getIncludes(), getDefines()); |
527 } | |
528 } | |
529 | |
530 class C2ProductConfig extends ProductConfig { | |
531 C2ProductConfig() { | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
532 initNames("compiler2", "product", "jvm.dll"); |
0 | 533 init(getIncludes(), getDefines()); |
534 } | |
535 } | |
536 | |
537 class TieredProductConfig extends ProductConfig { | |
538 TieredProductConfig() { | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
539 initNames("tiered", "product", "jvm.dll"); |
0 | 540 init(getIncludes(), getDefines()); |
541 } | |
542 } | |
543 | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
544 class CoreDebugConfig extends GenericDebugNonKernelConfig { |
0 | 545 String getOptFlag() { |
546 return getCI().getNoOptFlag(); | |
547 } | |
548 | |
549 CoreDebugConfig() { | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
550 initNames("core", "debug", "jvm.dll"); |
0 | 551 init(getIncludes(), getDefines()); |
552 } | |
553 } | |
554 | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
555 class CoreFastDebugConfig extends GenericDebugNonKernelConfig { |
0 | 556 String getOptFlag() { |
557 return getCI().getOptFlag(); | |
558 } | |
559 | |
560 CoreFastDebugConfig() { | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
561 initNames("core", "fastdebug", "jvm.dll"); |
0 | 562 init(getIncludes(), getDefines()); |
563 } | |
564 } | |
565 | |
566 class CoreProductConfig extends ProductConfig { | |
567 CoreProductConfig() { | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
568 initNames("core", "product", "jvm.dll"); |
0 | 569 init(getIncludes(), getDefines()); |
570 } | |
571 } | |
572 | |
6801 | 573 |
0 | 574 abstract class CompilerInterface { |
575 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
|
576 abstract Vector getBaseLinkerFlags(String outDir, String outDll, String platformName); |
0 | 577 abstract Vector getDebugCompilerFlags(String opt); |
578 abstract Vector getDebugLinkerFlags(); | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
579 abstract void getAdditionalNonKernelLinkerFlags(Vector rv); |
0 | 580 abstract Vector getProductCompilerFlags(); |
581 abstract Vector getProductLinkerFlags(); | |
582 abstract String getOptFlag(); | |
583 abstract String getNoOptFlag(); | |
2233
15d6977f04b0
7017824: Add support for creating 64-bit Visual Studio projects
sla
parents:
2027
diff
changeset
|
584 abstract String makeCfgName(String flavourBuild, String platformName); |
0 | 585 |
586 void addAttr(Vector receiver, String attr, String value) { | |
587 receiver.add(attr); receiver.add(value); | |
588 } | |
2027
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
589 void extAttr(Vector receiver, String attr, String value) { |
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
590 int attr_pos=receiver.indexOf(attr) ; |
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
591 if ( attr_pos == -1) { |
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
592 // 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
|
593 receiver.add(attr); receiver.add(value); |
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
594 } else { |
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
595 // 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
|
596 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
|
597 } |
aa6e219afbf1
7006354: Updates to Visual Studio project creation and development launcher
sla
parents:
1972
diff
changeset
|
598 } |
0 | 599 } |