annotate src/share/tools/ProjectCreator/BuildConfig.java @ 6948:e522a00b91aa

Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/ after NPG - C++ build works
author Doug Simon <doug.simon@oracle.com>
date Mon, 12 Nov 2012 23:14:12 +0100
parents 33df1aeaebbf 1a9b9cfcef41
children b9a918201d47
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
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
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 *
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
a61af66fc99e Initial load
duke
parents:
diff changeset
22 *
a61af66fc99e Initial load
duke
parents:
diff changeset
23 */
a61af66fc99e Initial load
duke
parents:
diff changeset
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
a61af66fc99e Initial load
duke
parents:
diff changeset
28
a61af66fc99e Initial load
duke
parents:
diff changeset
29 class BuildConfig {
6801
1a9b9cfcef41 7163863: Updated projectcreator
neliasso
parents: 4878
diff changeset
30 @SuppressWarnings("rawtypes")
0
a61af66fc99e Initial load
duke
parents:
diff changeset
31 Hashtable vars;
6801
1a9b9cfcef41 7163863: Updated projectcreator
neliasso
parents: 4878
diff changeset
32 Vector<String> basicNames, basicPaths;
0
a61af66fc99e Initial load
duke
parents:
diff changeset
33 String[] context;
a61af66fc99e Initial load
duke
parents:
diff changeset
34
a61af66fc99e Initial load
duke
parents:
diff changeset
35 static CompilerInterface ci;
a61af66fc99e Initial load
duke
parents:
diff changeset
36 static CompilerInterface getCI() {
a61af66fc99e Initial load
duke
parents:
diff changeset
37 if (ci == null) {
a61af66fc99e Initial load
duke
parents:
diff changeset
38 String comp = (String)getField(null, "CompilerVersion");
a61af66fc99e Initial load
duke
parents:
diff changeset
39 try {
a61af66fc99e Initial load
duke
parents:
diff changeset
40 ci = (CompilerInterface)Class.forName("CompilerInterface" + comp).newInstance();
a61af66fc99e Initial load
duke
parents:
diff changeset
41 } catch (Exception cnfe) {
a61af66fc99e Initial load
duke
parents:
diff changeset
42 System.err.println("Cannot find support for compiler " + comp);
a61af66fc99e Initial load
duke
parents:
diff changeset
43 throw new RuntimeException(cnfe.toString());
a61af66fc99e Initial load
duke
parents:
diff changeset
44 }
a61af66fc99e Initial load
duke
parents:
diff changeset
45 }
a61af66fc99e Initial load
duke
parents:
diff changeset
46 return ci;
a61af66fc99e Initial load
duke
parents:
diff changeset
47 }
a61af66fc99e Initial load
duke
parents:
diff changeset
48
6801
1a9b9cfcef41 7163863: Updated projectcreator
neliasso
parents: 4878
diff changeset
49 @SuppressWarnings("rawtypes")
0
a61af66fc99e Initial load
duke
parents:
diff changeset
50 protected void initNames(String flavour, String build, String outDll) {
a61af66fc99e Initial load
duke
parents:
diff changeset
51 if (vars == null) vars = new Hashtable();
a61af66fc99e Initial load
duke
parents:
diff changeset
52
a61af66fc99e Initial load
duke
parents:
diff changeset
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
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
55 System.out.println();
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
56 System.out.println(flavourBuild);
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
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
a61af66fc99e Initial load
duke
parents:
diff changeset
59 put("Flavour", flavour);
a61af66fc99e Initial load
duke
parents:
diff changeset
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
a61af66fc99e Initial load
duke
parents:
diff changeset
62
a61af66fc99e Initial load
duke
parents:
diff changeset
63 // ones mentioned above were needed to expand format
a61af66fc99e Initial load
duke
parents:
diff changeset
64 String buildBase = expandFormat(getFieldString(null, "BuildBase"));
a61af66fc99e Initial load
duke
parents:
diff changeset
65 String sourceBase = getFieldString(null, "SourceBase");
6801
1a9b9cfcef41 7163863: Updated projectcreator
neliasso
parents: 4878
diff changeset
66 String buildSpace = getFieldString(null, "BuildSpace");
0
a61af66fc99e Initial load
duke
parents:
diff changeset
67 String outDir = buildBase;
4177
c843578c269d Make building work on Windows.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 3543
diff changeset
68 String value = System.getenv("OUT_DIR");
c843578c269d Make building work on Windows.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 3543
diff changeset
69 if (value != null) {
c843578c269d Make building work on Windows.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 3543
diff changeset
70 outDir = value;
c843578c269d Make building work on Windows.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 3543
diff changeset
71 }
4597
8bc6f680a88d fixed visual studio project files
Christian Haeubl <christian.haeubl@oracle.com>
parents: 4572
diff changeset
72
8bc6f680a88d fixed visual studio project files
Christian Haeubl <christian.haeubl@oracle.com>
parents: 4572
diff changeset
73 int lastDirectorySeparator = Math.max(outDir.lastIndexOf("/"), outDir.lastIndexOf("\\"));
8bc6f680a88d fixed visual studio project files
Christian Haeubl <christian.haeubl@oracle.com>
parents: 4572
diff changeset
74 if (lastDirectorySeparator >= 0) {
8bc6f680a88d fixed visual studio project files
Christian Haeubl <christian.haeubl@oracle.com>
parents: 4572
diff changeset
75 outDir = outDir.substring(0, lastDirectorySeparator);
4475
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
4634
0f899c0b7e86 fixed VS project files
Christian Haeubl <christian.haeubl@oracle.com>
parents: 4597
diff changeset
78 outDir += Util.sep + build + 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
79 if (flavour.equals("graal")) {
4177
c843578c269d Make building work on Windows.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 3543
diff changeset
80 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
81 } 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
82 outDir += Util.sep + "client";
4177
c843578c269d Make building work on Windows.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 3543
diff changeset
83 } else {
c843578c269d Make building work on Windows.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 3543
diff changeset
84 outDir += Util.sep + "server";
c843578c269d Make building work on Windows.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 3543
diff changeset
85 }
c843578c269d Make building work on Windows.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 3543
diff changeset
86 buildBase = outDir;
0
a61af66fc99e Initial load
duke
parents:
diff changeset
87
a61af66fc99e Initial load
duke
parents:
diff changeset
88 put("Id", flavourBuild);
a61af66fc99e Initial load
duke
parents:
diff changeset
89 put("OutputDir", outDir);
a61af66fc99e Initial load
duke
parents:
diff changeset
90 put("SourceBase", sourceBase);
a61af66fc99e Initial load
duke
parents:
diff changeset
91 put("BuildBase", buildBase);
6801
1a9b9cfcef41 7163863: Updated projectcreator
neliasso
parents: 4878
diff changeset
92 put("BuildSpace", buildSpace);
2027
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
93 put("OutputDll", outDir + Util.sep + outDll);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
94
a61af66fc99e Initial load
duke
parents:
diff changeset
95 context = new String [] {flavourBuild, flavour, build, null};
a61af66fc99e Initial load
duke
parents:
diff changeset
96 }
a61af66fc99e Initial load
duke
parents:
diff changeset
97
6801
1a9b9cfcef41 7163863: Updated projectcreator
neliasso
parents: 4878
diff changeset
98 protected void init(Vector<String> includes, Vector<String> defines) {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
99 initDefaultDefines(defines);
a61af66fc99e Initial load
duke
parents:
diff changeset
100 initDefaultCompilerFlags(includes);
a61af66fc99e Initial load
duke
parents:
diff changeset
101 initDefaultLinkerFlags();
6801
1a9b9cfcef41 7163863: Updated projectcreator
neliasso
parents: 4878
diff changeset
102 //handleDB();
0
a61af66fc99e Initial load
duke
parents:
diff changeset
103 }
a61af66fc99e Initial load
duke
parents:
diff changeset
104
a61af66fc99e Initial load
duke
parents:
diff changeset
105
6801
1a9b9cfcef41 7163863: Updated projectcreator
neliasso
parents: 4878
diff changeset
106 protected void initDefaultCompilerFlags(Vector<String> includes) {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
107 Vector compilerFlags = new Vector();
a61af66fc99e Initial load
duke
parents:
diff changeset
108
a61af66fc99e Initial load
duke
parents:
diff changeset
109 compilerFlags.addAll(getCI().getBaseCompilerFlags(getV("Define"),
a61af66fc99e Initial load
duke
parents:
diff changeset
110 includes,
a61af66fc99e Initial load
duke
parents:
diff changeset
111 get("OutputDir")));
a61af66fc99e Initial load
duke
parents:
diff changeset
112
a61af66fc99e Initial load
duke
parents:
diff changeset
113 put("CompilerFlags", compilerFlags);
a61af66fc99e Initial load
duke
parents:
diff changeset
114 }
a61af66fc99e Initial load
duke
parents:
diff changeset
115
a61af66fc99e Initial load
duke
parents:
diff changeset
116 protected void initDefaultLinkerFlags() {
a61af66fc99e Initial load
duke
parents:
diff changeset
117 Vector linkerFlags = new Vector();
a61af66fc99e Initial load
duke
parents:
diff changeset
118
2233
15d6977f04b0 7017824: Add support for creating 64-bit Visual Studio projects
sla
parents: 2027
diff changeset
119 linkerFlags.addAll(getCI().getBaseLinkerFlags( get("OutputDir"), get("OutputDll"), get("PlatformName")));
0
a61af66fc99e Initial load
duke
parents:
diff changeset
120
a61af66fc99e Initial load
duke
parents:
diff changeset
121 put("LinkerFlags", linkerFlags);
a61af66fc99e Initial load
duke
parents:
diff changeset
122 }
a61af66fc99e Initial load
duke
parents:
diff changeset
123
6801
1a9b9cfcef41 7163863: Updated projectcreator
neliasso
parents: 4878
diff changeset
124 public boolean matchesIgnoredPath(String path) {
1a9b9cfcef41 7163863: Updated projectcreator
neliasso
parents: 4878
diff changeset
125 Vector<String> rv = new Vector<String>();
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
126 collectRelevantVectors(rv, "IgnorePath");
6801
1a9b9cfcef41 7163863: Updated projectcreator
neliasso
parents: 4878
diff changeset
127 for (String pathPart : rv) {
1a9b9cfcef41 7163863: Updated projectcreator
neliasso
parents: 4878
diff changeset
128 if (path.contains(pathPart)) {
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
129 return true;
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
130 }
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
131 }
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
132 return false;
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
133 }
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
134
6801
1a9b9cfcef41 7163863: Updated projectcreator
neliasso
parents: 4878
diff changeset
135 public boolean matchesHidePath(String path) {
1a9b9cfcef41 7163863: Updated projectcreator
neliasso
parents: 4878
diff changeset
136 Vector<String> rv = new Vector<String>();
1a9b9cfcef41 7163863: Updated projectcreator
neliasso
parents: 4878
diff changeset
137 collectRelevantVectors(rv, "HidePath");
1a9b9cfcef41 7163863: Updated projectcreator
neliasso
parents: 4878
diff changeset
138 for (String pathPart : rv) {
1a9b9cfcef41 7163863: Updated projectcreator
neliasso
parents: 4878
diff changeset
139 if (path.contains(Util.normalize(pathPart))) {
1a9b9cfcef41 7163863: Updated projectcreator
neliasso
parents: 4878
diff changeset
140 return true;
1a9b9cfcef41 7163863: Updated projectcreator
neliasso
parents: 4878
diff changeset
141 }
1a9b9cfcef41 7163863: Updated projectcreator
neliasso
parents: 4878
diff changeset
142 }
1a9b9cfcef41 7163863: Updated projectcreator
neliasso
parents: 4878
diff changeset
143 return false;
1a9b9cfcef41 7163863: Updated projectcreator
neliasso
parents: 4878
diff changeset
144 }
1a9b9cfcef41 7163863: Updated projectcreator
neliasso
parents: 4878
diff changeset
145
1a9b9cfcef41 7163863: Updated projectcreator
neliasso
parents: 4878
diff changeset
146 public Vector<String> matchesAdditionalGeneratedPath(String fullPath) {
1a9b9cfcef41 7163863: Updated projectcreator
neliasso
parents: 4878
diff changeset
147 Vector<String> rv = new Vector<String>();
1a9b9cfcef41 7163863: Updated projectcreator
neliasso
parents: 4878
diff changeset
148 Hashtable<String, String> v = (Hashtable<String, String>)BuildConfig.getField(this.toString(), "AdditionalGeneratedFile");
1a9b9cfcef41 7163863: Updated projectcreator
neliasso
parents: 4878
diff changeset
149 if (v != null) {
1a9b9cfcef41 7163863: Updated projectcreator
neliasso
parents: 4878
diff changeset
150 for (Enumeration<String> e=v.keys(); e.hasMoreElements(); ) {
1a9b9cfcef41 7163863: Updated projectcreator
neliasso
parents: 4878
diff changeset
151 String key = e.nextElement();
1a9b9cfcef41 7163863: Updated projectcreator
neliasso
parents: 4878
diff changeset
152 String val = v.get(key);
1a9b9cfcef41 7163863: Updated projectcreator
neliasso
parents: 4878
diff changeset
153
1a9b9cfcef41 7163863: Updated projectcreator
neliasso
parents: 4878
diff changeset
154 if (fullPath.endsWith(expandFormat(key))) {
1a9b9cfcef41 7163863: Updated projectcreator
neliasso
parents: 4878
diff changeset
155 rv.add(expandFormat(val));
0
a61af66fc99e Initial load
duke
parents:
diff changeset
156 }
a61af66fc99e Initial load
duke
parents:
diff changeset
157 }
a61af66fc99e Initial load
duke
parents:
diff changeset
158 }
6801
1a9b9cfcef41 7163863: Updated projectcreator
neliasso
parents: 4878
diff changeset
159 return rv;
0
a61af66fc99e Initial load
duke
parents:
diff changeset
160 }
a61af66fc99e Initial load
duke
parents:
diff changeset
161
a61af66fc99e Initial load
duke
parents:
diff changeset
162 void addTo(Hashtable ht, String key, String value) {
a61af66fc99e Initial load
duke
parents:
diff changeset
163 ht.put(expandFormat(key), expandFormat(value));
a61af66fc99e Initial load
duke
parents:
diff changeset
164 }
a61af66fc99e Initial load
duke
parents:
diff changeset
165
a61af66fc99e Initial load
duke
parents:
diff changeset
166 void initDefaultDefines(Vector defines) {
a61af66fc99e Initial load
duke
parents:
diff changeset
167 Vector sysDefines = new Vector();
2184
5d801e6b9a80 Imported build system changes from other repository.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents: 2044
diff changeset
168
2273
2ab52cda08e5 Merge with OpenJDK.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents: 2184 2233
diff changeset
169 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
170 sysDefines.add("WIN32");
1408
0ba67bb5392c added c1x build directory, added MSVC Win64 project support
lstadler
parents: 844
diff changeset
171 } else {
2184
5d801e6b9a80 Imported build system changes from other repository.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents: 2044
diff changeset
172 sysDefines.add("_AMD64_");
5d801e6b9a80 Imported build system changes from other repository.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents: 2044
diff changeset
173 sysDefines.add("AMD64");
5d801e6b9a80 Imported build system changes from other repository.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents: 2044
diff changeset
174 sysDefines.add("_WIN64");
5d801e6b9a80 Imported build system changes from other repository.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents: 2044
diff changeset
175 sysDefines.add("_LP64");
5d801e6b9a80 Imported build system changes from other repository.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents: 2044
diff changeset
176 if (System.getenv("MSC_VER") != null)
5d801e6b9a80 Imported build system changes from other repository.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents: 2044
diff changeset
177 sysDefines.add("MSC_VER=" + System.getenv("MSC_VER"));
1408
0ba67bb5392c added c1x build directory, added MSVC Win64 project support
lstadler
parents: 844
diff changeset
178 sysDefines.add("HOTSPOT_LIB_ARCH=\\\"amd64\\\"");
0ba67bb5392c added c1x build directory, added MSVC Win64 project support
lstadler
parents: 844
diff changeset
179 }
2184
5d801e6b9a80 Imported build system changes from other repository.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents: 2044
diff changeset
180
0
a61af66fc99e Initial load
duke
parents:
diff changeset
181 sysDefines.add("_WINDOWS");
2233
15d6977f04b0 7017824: Add support for creating 64-bit Visual Studio projects
sla
parents: 2027
diff changeset
182 sysDefines.add("HOTSPOT_BUILD_USER=\\\""+System.getProperty("user.name")+"\\\"");
0
a61af66fc99e Initial load
duke
parents:
diff changeset
183 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
184 sysDefines.add("INCLUDE_TRACE");
0
a61af66fc99e Initial load
duke
parents:
diff changeset
185 sysDefines.add("_JNI_IMPLEMENTATION_");
2233
15d6977f04b0 7017824: Add support for creating 64-bit Visual Studio projects
sla
parents: 2027
diff changeset
186 if (vars.get("PlatformName").equals("Win32")) {
15d6977f04b0 7017824: Add support for creating 64-bit Visual Studio projects
sla
parents: 2027
diff changeset
187 sysDefines.add("HOTSPOT_LIB_ARCH=\\\"i386\\\"");
15d6977f04b0 7017824: Add support for creating 64-bit Visual Studio projects
sla
parents: 2027
diff changeset
188 } else {
15d6977f04b0 7017824: Add support for creating 64-bit Visual Studio projects
sla
parents: 2027
diff changeset
189 sysDefines.add("HOTSPOT_LIB_ARCH=\\\"amd64\\\"");
15d6977f04b0 7017824: Add support for creating 64-bit Visual Studio projects
sla
parents: 2027
diff changeset
190 }
0
a61af66fc99e Initial load
duke
parents:
diff changeset
191
a61af66fc99e Initial load
duke
parents:
diff changeset
192 sysDefines.addAll(defines);
a61af66fc99e Initial load
duke
parents:
diff changeset
193
a61af66fc99e Initial load
duke
parents:
diff changeset
194 put("Define", sysDefines);
a61af66fc99e Initial load
duke
parents:
diff changeset
195 }
a61af66fc99e Initial load
duke
parents:
diff changeset
196
a61af66fc99e Initial load
duke
parents:
diff changeset
197 String get(String key) {
a61af66fc99e Initial load
duke
parents:
diff changeset
198 return (String)vars.get(key);
a61af66fc99e Initial load
duke
parents:
diff changeset
199 }
a61af66fc99e Initial load
duke
parents:
diff changeset
200
a61af66fc99e Initial load
duke
parents:
diff changeset
201 Vector getV(String key) {
a61af66fc99e Initial load
duke
parents:
diff changeset
202 return (Vector)vars.get(key);
a61af66fc99e Initial load
duke
parents:
diff changeset
203 }
a61af66fc99e Initial load
duke
parents:
diff changeset
204
a61af66fc99e Initial load
duke
parents:
diff changeset
205 Object getO(String key) {
a61af66fc99e Initial load
duke
parents:
diff changeset
206 return vars.get(key);
a61af66fc99e Initial load
duke
parents:
diff changeset
207 }
a61af66fc99e Initial load
duke
parents:
diff changeset
208
a61af66fc99e Initial load
duke
parents:
diff changeset
209 Hashtable getH(String key) {
a61af66fc99e Initial load
duke
parents:
diff changeset
210 return (Hashtable)vars.get(key);
a61af66fc99e Initial load
duke
parents:
diff changeset
211 }
a61af66fc99e Initial load
duke
parents:
diff changeset
212
a61af66fc99e Initial load
duke
parents:
diff changeset
213 Object getFieldInContext(String field) {
a61af66fc99e Initial load
duke
parents:
diff changeset
214 for (int i=0; i<context.length; i++) {
a61af66fc99e Initial load
duke
parents:
diff changeset
215 Object rv = getField(context[i], field);
a61af66fc99e Initial load
duke
parents:
diff changeset
216 if (rv != null) {
a61af66fc99e Initial load
duke
parents:
diff changeset
217 return rv;
a61af66fc99e Initial load
duke
parents:
diff changeset
218 }
a61af66fc99e Initial load
duke
parents:
diff changeset
219 }
a61af66fc99e Initial load
duke
parents:
diff changeset
220 return null;
a61af66fc99e Initial load
duke
parents:
diff changeset
221 }
a61af66fc99e Initial load
duke
parents:
diff changeset
222
a61af66fc99e Initial load
duke
parents:
diff changeset
223 Object lookupHashFieldInContext(String field, String key) {
a61af66fc99e Initial load
duke
parents:
diff changeset
224 for (int i=0; i<context.length; i++) {
a61af66fc99e Initial load
duke
parents:
diff changeset
225 Hashtable ht = (Hashtable)getField(context[i], field);
a61af66fc99e Initial load
duke
parents:
diff changeset
226 if (ht != null) {
a61af66fc99e Initial load
duke
parents:
diff changeset
227 Object rv = ht.get(key);
a61af66fc99e Initial load
duke
parents:
diff changeset
228 if (rv != null) {
a61af66fc99e Initial load
duke
parents:
diff changeset
229 return rv;
a61af66fc99e Initial load
duke
parents:
diff changeset
230 }
a61af66fc99e Initial load
duke
parents:
diff changeset
231 }
a61af66fc99e Initial load
duke
parents:
diff changeset
232 }
a61af66fc99e Initial load
duke
parents:
diff changeset
233 return null;
a61af66fc99e Initial load
duke
parents:
diff changeset
234 }
a61af66fc99e Initial load
duke
parents:
diff changeset
235
a61af66fc99e Initial load
duke
parents:
diff changeset
236 void put(String key, String value) {
a61af66fc99e Initial load
duke
parents:
diff changeset
237 vars.put(key, value);
a61af66fc99e Initial load
duke
parents:
diff changeset
238 }
a61af66fc99e Initial load
duke
parents:
diff changeset
239
a61af66fc99e Initial load
duke
parents:
diff changeset
240 void put(String key, Vector vvalue) {
a61af66fc99e Initial load
duke
parents:
diff changeset
241 vars.put(key, vvalue);
a61af66fc99e Initial load
duke
parents:
diff changeset
242 }
a61af66fc99e Initial load
duke
parents:
diff changeset
243
a61af66fc99e Initial load
duke
parents:
diff changeset
244 void add(String key, Vector vvalue) {
a61af66fc99e Initial load
duke
parents:
diff changeset
245 getV(key).addAll(vvalue);
a61af66fc99e Initial load
duke
parents:
diff changeset
246 }
a61af66fc99e Initial load
duke
parents:
diff changeset
247
a61af66fc99e Initial load
duke
parents:
diff changeset
248 String flavour() {
a61af66fc99e Initial load
duke
parents:
diff changeset
249 return get("Flavour");
a61af66fc99e Initial load
duke
parents:
diff changeset
250 }
a61af66fc99e Initial load
duke
parents:
diff changeset
251
a61af66fc99e Initial load
duke
parents:
diff changeset
252 String build() {
a61af66fc99e Initial load
duke
parents:
diff changeset
253 return get("Build");
a61af66fc99e Initial load
duke
parents:
diff changeset
254 }
a61af66fc99e Initial load
duke
parents:
diff changeset
255
2184
5d801e6b9a80 Imported build system changes from other repository.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents: 2044
diff changeset
256 String outputDir() {
5d801e6b9a80 Imported build system changes from other repository.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents: 2044
diff changeset
257 return get("OutputDir");
5d801e6b9a80 Imported build system changes from other repository.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents: 2044
diff changeset
258 }
5d801e6b9a80 Imported build system changes from other repository.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents: 2044
diff changeset
259
0
a61af66fc99e Initial load
duke
parents:
diff changeset
260 Object getSpecificField(String field) {
a61af66fc99e Initial load
duke
parents:
diff changeset
261 return getField(get("Id"), field);
a61af66fc99e Initial load
duke
parents:
diff changeset
262 }
a61af66fc99e Initial load
duke
parents:
diff changeset
263
a61af66fc99e Initial load
duke
parents:
diff changeset
264 void putSpecificField(String field, Object value) {
a61af66fc99e Initial load
duke
parents:
diff changeset
265 putField(get("Id"), field, value);
a61af66fc99e Initial load
duke
parents:
diff changeset
266 }
a61af66fc99e Initial load
duke
parents:
diff changeset
267
a61af66fc99e Initial load
duke
parents:
diff changeset
268 void collectRelevantVectors(Vector rv, String field) {
6801
1a9b9cfcef41 7163863: Updated projectcreator
neliasso
parents: 4878
diff changeset
269 for (String ctx : context) {
1a9b9cfcef41 7163863: Updated projectcreator
neliasso
parents: 4878
diff changeset
270 Vector<String> v = getFieldVector(ctx, field);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
271 if (v != null) {
6801
1a9b9cfcef41 7163863: Updated projectcreator
neliasso
parents: 4878
diff changeset
272 for (String val : v) {
1a9b9cfcef41 7163863: Updated projectcreator
neliasso
parents: 4878
diff changeset
273 rv.add(expandFormat(val).replace('/', '\\'));
0
a61af66fc99e Initial load
duke
parents:
diff changeset
274 }
a61af66fc99e Initial load
duke
parents:
diff changeset
275 }
a61af66fc99e Initial load
duke
parents:
diff changeset
276 }
a61af66fc99e Initial load
duke
parents:
diff changeset
277 }
a61af66fc99e Initial load
duke
parents:
diff changeset
278
a61af66fc99e Initial load
duke
parents:
diff changeset
279 void collectRelevantHashes(Hashtable rv, String field) {
6801
1a9b9cfcef41 7163863: Updated projectcreator
neliasso
parents: 4878
diff changeset
280 for (String ctx : context) {
1a9b9cfcef41 7163863: Updated projectcreator
neliasso
parents: 4878
diff changeset
281 Hashtable v = (Hashtable)getField(ctx, field);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
282 if (v != null) {
a61af66fc99e Initial load
duke
parents:
diff changeset
283 for (Enumeration e=v.keys(); e.hasMoreElements(); ) {
a61af66fc99e Initial load
duke
parents:
diff changeset
284 String key = (String)e.nextElement();
a61af66fc99e Initial load
duke
parents:
diff changeset
285 String val = (String)v.get(key);
a61af66fc99e Initial load
duke
parents:
diff changeset
286 addTo(rv, key, val);
a61af66fc99e Initial load
duke
parents:
diff changeset
287 }
a61af66fc99e Initial load
duke
parents:
diff changeset
288 }
a61af66fc99e Initial load
duke
parents:
diff changeset
289 }
a61af66fc99e Initial load
duke
parents:
diff changeset
290 }
a61af66fc99e Initial load
duke
parents:
diff changeset
291
a61af66fc99e Initial load
duke
parents:
diff changeset
292
a61af66fc99e Initial load
duke
parents:
diff changeset
293 Vector getDefines() {
a61af66fc99e Initial load
duke
parents:
diff changeset
294 Vector rv = new Vector();
a61af66fc99e Initial load
duke
parents:
diff changeset
295 collectRelevantVectors(rv, "Define");
a61af66fc99e Initial load
duke
parents:
diff changeset
296 return rv;
a61af66fc99e Initial load
duke
parents:
diff changeset
297 }
a61af66fc99e Initial load
duke
parents:
diff changeset
298
a61af66fc99e Initial load
duke
parents:
diff changeset
299 Vector getIncludes() {
a61af66fc99e Initial load
duke
parents:
diff changeset
300 Vector rv = new Vector();
a61af66fc99e Initial load
duke
parents:
diff changeset
301 collectRelevantVectors(rv, "AbsoluteInclude");
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
302 rv.addAll(getSourceIncludes());
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
303 return rv;
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
304 }
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
305
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
306 private Vector getSourceIncludes() {
6801
1a9b9cfcef41 7163863: Updated projectcreator
neliasso
parents: 4878
diff changeset
307 Vector<String> rv = new Vector<String>();
1a9b9cfcef41 7163863: Updated projectcreator
neliasso
parents: 4878
diff changeset
308 Vector<String> ri = new Vector<String>();
0
a61af66fc99e Initial load
duke
parents:
diff changeset
309 String sourceBase = getFieldString(null, "SourceBase");
a61af66fc99e Initial load
duke
parents:
diff changeset
310 collectRelevantVectors(ri, "RelativeInclude");
6801
1a9b9cfcef41 7163863: Updated projectcreator
neliasso
parents: 4878
diff changeset
311 for (String f : ri) {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
312 rv.add(sourceBase + Util.sep + f);
a61af66fc99e Initial load
duke
parents:
diff changeset
313 }
a61af66fc99e Initial load
duke
parents:
diff changeset
314 return rv;
a61af66fc99e Initial load
duke
parents:
diff changeset
315 }
a61af66fc99e Initial load
duke
parents:
diff changeset
316
a61af66fc99e Initial load
duke
parents:
diff changeset
317 static Hashtable cfgData = new Hashtable();
a61af66fc99e Initial load
duke
parents:
diff changeset
318 static Hashtable globalData = new Hashtable();
a61af66fc99e Initial load
duke
parents:
diff changeset
319
a61af66fc99e Initial load
duke
parents:
diff changeset
320 static boolean appliesToTieredBuild(String cfg) {
a61af66fc99e Initial load
duke
parents:
diff changeset
321 return (cfg != null &&
a61af66fc99e Initial load
duke
parents:
diff changeset
322 (cfg.startsWith("compiler1") ||
a61af66fc99e Initial load
duke
parents:
diff changeset
323 cfg.startsWith("compiler2")));
a61af66fc99e Initial load
duke
parents:
diff changeset
324 }
a61af66fc99e Initial load
duke
parents:
diff changeset
325
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
326 // Filters out the IgnoreFile and IgnorePaths since they are
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
327 // handled specially for tiered builds.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
328 static boolean appliesToTieredBuild(String cfg, String key) {
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
329 return (appliesToTieredBuild(cfg))&& (key != null && !key.startsWith("Ignore"));
0
a61af66fc99e Initial load
duke
parents:
diff changeset
330 }
a61af66fc99e Initial load
duke
parents:
diff changeset
331
a61af66fc99e Initial load
duke
parents:
diff changeset
332 static String getTieredBuildCfg(String cfg) {
a61af66fc99e Initial load
duke
parents:
diff changeset
333 assert appliesToTieredBuild(cfg) : "illegal configuration " + cfg;
a61af66fc99e Initial load
duke
parents:
diff changeset
334 return "tiered" + cfg.substring(9);
a61af66fc99e Initial load
duke
parents:
diff changeset
335 }
a61af66fc99e Initial load
duke
parents:
diff changeset
336
a61af66fc99e Initial load
duke
parents:
diff changeset
337 static Object getField(String cfg, String field) {
a61af66fc99e Initial load
duke
parents:
diff changeset
338 if (cfg == null) {
a61af66fc99e Initial load
duke
parents:
diff changeset
339 return globalData.get(field);
a61af66fc99e Initial load
duke
parents:
diff changeset
340 }
a61af66fc99e Initial load
duke
parents:
diff changeset
341
a61af66fc99e Initial load
duke
parents:
diff changeset
342 Hashtable ht = (Hashtable)cfgData.get(cfg);
a61af66fc99e Initial load
duke
parents:
diff changeset
343 return ht == null ? null : ht.get(field);
a61af66fc99e Initial load
duke
parents:
diff changeset
344 }
a61af66fc99e Initial load
duke
parents:
diff changeset
345
a61af66fc99e Initial load
duke
parents:
diff changeset
346 static String getFieldString(String cfg, String field) {
a61af66fc99e Initial load
duke
parents:
diff changeset
347 return (String)getField(cfg, field);
a61af66fc99e Initial load
duke
parents:
diff changeset
348 }
a61af66fc99e Initial load
duke
parents:
diff changeset
349
a61af66fc99e Initial load
duke
parents:
diff changeset
350 static Vector getFieldVector(String cfg, String field) {
a61af66fc99e Initial load
duke
parents:
diff changeset
351 return (Vector)getField(cfg, field);
a61af66fc99e Initial load
duke
parents:
diff changeset
352 }
a61af66fc99e Initial load
duke
parents:
diff changeset
353
a61af66fc99e Initial load
duke
parents:
diff changeset
354 static void putField(String cfg, String field, Object value) {
a61af66fc99e Initial load
duke
parents:
diff changeset
355 putFieldImpl(cfg, field, value);
a61af66fc99e Initial load
duke
parents:
diff changeset
356 if (appliesToTieredBuild(cfg, field)) {
a61af66fc99e Initial load
duke
parents:
diff changeset
357 putFieldImpl(getTieredBuildCfg(cfg), field, value);
a61af66fc99e Initial load
duke
parents:
diff changeset
358 }
a61af66fc99e Initial load
duke
parents:
diff changeset
359 }
a61af66fc99e Initial load
duke
parents:
diff changeset
360
a61af66fc99e Initial load
duke
parents:
diff changeset
361 private static void putFieldImpl(String cfg, String field, Object value) {
a61af66fc99e Initial load
duke
parents:
diff changeset
362 if (cfg == null) {
a61af66fc99e Initial load
duke
parents:
diff changeset
363 globalData.put(field, value);
a61af66fc99e Initial load
duke
parents:
diff changeset
364 return;
a61af66fc99e Initial load
duke
parents:
diff changeset
365 }
a61af66fc99e Initial load
duke
parents:
diff changeset
366
a61af66fc99e Initial load
duke
parents:
diff changeset
367 Hashtable ht = (Hashtable)cfgData.get(cfg);
a61af66fc99e Initial load
duke
parents:
diff changeset
368 if (ht == null) {
a61af66fc99e Initial load
duke
parents:
diff changeset
369 ht = new Hashtable();
a61af66fc99e Initial load
duke
parents:
diff changeset
370 cfgData.put(cfg, ht);
a61af66fc99e Initial load
duke
parents:
diff changeset
371 }
a61af66fc99e Initial load
duke
parents:
diff changeset
372
a61af66fc99e Initial load
duke
parents:
diff changeset
373 ht.put(field, value);
a61af66fc99e Initial load
duke
parents:
diff changeset
374 }
a61af66fc99e Initial load
duke
parents:
diff changeset
375
a61af66fc99e Initial load
duke
parents:
diff changeset
376 static Object getFieldHash(String cfg, String field, String name) {
a61af66fc99e Initial load
duke
parents:
diff changeset
377 Hashtable ht = (Hashtable)getField(cfg, field);
a61af66fc99e Initial load
duke
parents:
diff changeset
378
a61af66fc99e Initial load
duke
parents:
diff changeset
379 return ht == null ? null : ht.get(name);
a61af66fc99e Initial load
duke
parents:
diff changeset
380 }
a61af66fc99e Initial load
duke
parents:
diff changeset
381
a61af66fc99e Initial load
duke
parents:
diff changeset
382 static void putFieldHash(String cfg, String field, String name, Object val) {
a61af66fc99e Initial load
duke
parents:
diff changeset
383 putFieldHashImpl(cfg, field, name, val);
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
384 if (appliesToTieredBuild(cfg, field)) {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
385 putFieldHashImpl(getTieredBuildCfg(cfg), field, name, val);
a61af66fc99e Initial load
duke
parents:
diff changeset
386 }
a61af66fc99e Initial load
duke
parents:
diff changeset
387 }
a61af66fc99e Initial load
duke
parents:
diff changeset
388
a61af66fc99e Initial load
duke
parents:
diff changeset
389 private static void putFieldHashImpl(String cfg, String field, String name, Object val) {
a61af66fc99e Initial load
duke
parents:
diff changeset
390 Hashtable ht = (Hashtable)getField(cfg, field);
a61af66fc99e Initial load
duke
parents:
diff changeset
391
a61af66fc99e Initial load
duke
parents:
diff changeset
392 if (ht == null) {
a61af66fc99e Initial load
duke
parents:
diff changeset
393 ht = new Hashtable();
a61af66fc99e Initial load
duke
parents:
diff changeset
394 putFieldImpl(cfg, field, ht);
a61af66fc99e Initial load
duke
parents:
diff changeset
395 }
a61af66fc99e Initial load
duke
parents:
diff changeset
396
a61af66fc99e Initial load
duke
parents:
diff changeset
397 ht.put(name, val);
a61af66fc99e Initial load
duke
parents:
diff changeset
398 }
a61af66fc99e Initial load
duke
parents:
diff changeset
399
a61af66fc99e Initial load
duke
parents:
diff changeset
400 static void addFieldVector(String cfg, String field, String element) {
a61af66fc99e Initial load
duke
parents:
diff changeset
401 addFieldVectorImpl(cfg, field, element);
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
402 if (appliesToTieredBuild(cfg, field)) {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
403 addFieldVectorImpl(getTieredBuildCfg(cfg), field, element);
a61af66fc99e Initial load
duke
parents:
diff changeset
404 }
a61af66fc99e Initial load
duke
parents:
diff changeset
405 }
a61af66fc99e Initial load
duke
parents:
diff changeset
406
a61af66fc99e Initial load
duke
parents:
diff changeset
407 private static void addFieldVectorImpl(String cfg, String field, String element) {
a61af66fc99e Initial load
duke
parents:
diff changeset
408 Vector v = (Vector)getField(cfg, field);
a61af66fc99e Initial load
duke
parents:
diff changeset
409
a61af66fc99e Initial load
duke
parents:
diff changeset
410 if (v == null) {
a61af66fc99e Initial load
duke
parents:
diff changeset
411 v = new Vector();
a61af66fc99e Initial load
duke
parents:
diff changeset
412 putFieldImpl(cfg, field, v);
a61af66fc99e Initial load
duke
parents:
diff changeset
413 }
a61af66fc99e Initial load
duke
parents:
diff changeset
414
a61af66fc99e Initial load
duke
parents:
diff changeset
415 v.add(element);
a61af66fc99e Initial load
duke
parents:
diff changeset
416 }
a61af66fc99e Initial load
duke
parents:
diff changeset
417
a61af66fc99e Initial load
duke
parents:
diff changeset
418 String expandFormat(String format) {
a61af66fc99e Initial load
duke
parents:
diff changeset
419 if (format == null) {
a61af66fc99e Initial load
duke
parents:
diff changeset
420 return null;
a61af66fc99e Initial load
duke
parents:
diff changeset
421 }
a61af66fc99e Initial load
duke
parents:
diff changeset
422
a61af66fc99e Initial load
duke
parents:
diff changeset
423 if (format.indexOf('%') == -1) {
a61af66fc99e Initial load
duke
parents:
diff changeset
424 return format;
a61af66fc99e Initial load
duke
parents:
diff changeset
425 }
a61af66fc99e Initial load
duke
parents:
diff changeset
426
a61af66fc99e Initial load
duke
parents:
diff changeset
427 StringBuffer sb = new StringBuffer();
a61af66fc99e Initial load
duke
parents:
diff changeset
428 int len = format.length();
a61af66fc99e Initial load
duke
parents:
diff changeset
429 for (int i=0; i<len; i++) {
a61af66fc99e Initial load
duke
parents:
diff changeset
430 char ch = format.charAt(i);
a61af66fc99e Initial load
duke
parents:
diff changeset
431 if (ch == '%') {
a61af66fc99e Initial load
duke
parents:
diff changeset
432 char ch1 = format.charAt(i+1);
a61af66fc99e Initial load
duke
parents:
diff changeset
433 switch (ch1) {
a61af66fc99e Initial load
duke
parents:
diff changeset
434 case '%':
a61af66fc99e Initial load
duke
parents:
diff changeset
435 sb.append(ch1);
a61af66fc99e Initial load
duke
parents:
diff changeset
436 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
437 case 'b':
a61af66fc99e Initial load
duke
parents:
diff changeset
438 sb.append(build());
a61af66fc99e Initial load
duke
parents:
diff changeset
439 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
440 case 'f':
a61af66fc99e Initial load
duke
parents:
diff changeset
441 sb.append(flavour());
a61af66fc99e Initial load
duke
parents:
diff changeset
442 break;
2184
5d801e6b9a80 Imported build system changes from other repository.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents: 2044
diff changeset
443 case 'o':
5d801e6b9a80 Imported build system changes from other repository.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents: 2044
diff changeset
444 sb.append(outputDir());
5d801e6b9a80 Imported build system changes from other repository.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents: 2044
diff changeset
445 break;
0
a61af66fc99e Initial load
duke
parents:
diff changeset
446 default:
a61af66fc99e Initial load
duke
parents:
diff changeset
447 sb.append(ch);
a61af66fc99e Initial load
duke
parents:
diff changeset
448 sb.append(ch1);
a61af66fc99e Initial load
duke
parents:
diff changeset
449 }
a61af66fc99e Initial load
duke
parents:
diff changeset
450 i++;
a61af66fc99e Initial load
duke
parents:
diff changeset
451 } else {
a61af66fc99e Initial load
duke
parents:
diff changeset
452 sb.append(ch);
a61af66fc99e Initial load
duke
parents:
diff changeset
453 }
a61af66fc99e Initial load
duke
parents:
diff changeset
454 }
a61af66fc99e Initial load
duke
parents:
diff changeset
455
a61af66fc99e Initial load
duke
parents:
diff changeset
456 return sb.toString();
a61af66fc99e Initial load
duke
parents:
diff changeset
457 }
a61af66fc99e Initial load
duke
parents:
diff changeset
458 }
a61af66fc99e Initial load
duke
parents:
diff changeset
459
a61af66fc99e Initial load
duke
parents:
diff changeset
460 abstract class GenericDebugConfig extends BuildConfig {
a61af66fc99e Initial load
duke
parents:
diff changeset
461 abstract String getOptFlag();
a61af66fc99e Initial load
duke
parents:
diff changeset
462
a61af66fc99e Initial load
duke
parents:
diff changeset
463 protected void init(Vector includes, Vector defines) {
a61af66fc99e Initial load
duke
parents:
diff changeset
464 defines.add("_DEBUG");
a61af66fc99e Initial load
duke
parents:
diff changeset
465 defines.add("ASSERT");
a61af66fc99e Initial load
duke
parents:
diff changeset
466
a61af66fc99e Initial load
duke
parents:
diff changeset
467 super.init(includes, defines);
a61af66fc99e Initial load
duke
parents:
diff changeset
468
a61af66fc99e Initial load
duke
parents:
diff changeset
469 getV("CompilerFlags").addAll(getCI().getDebugCompilerFlags(getOptFlag()));
a61af66fc99e Initial load
duke
parents:
diff changeset
470 getV("LinkerFlags").addAll(getCI().getDebugLinkerFlags());
a61af66fc99e Initial load
duke
parents:
diff changeset
471 }
a61af66fc99e Initial load
duke
parents:
diff changeset
472 }
a61af66fc99e Initial load
duke
parents:
diff changeset
473
2027
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
474 abstract class GenericDebugNonKernelConfig extends GenericDebugConfig {
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
475 protected void init(Vector includes, Vector defines) {
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
476 super.init(includes, defines);
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
477 getCI().getAdditionalNonKernelLinkerFlags(getV("LinkerFlags"));
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
478 }
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
479 }
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
480
4572
76841bdd5f3e (Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents: 4475
diff changeset
481 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
482 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
483 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
484 }
76841bdd5f3e (Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents: 4475
diff changeset
485
76841bdd5f3e (Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents: 4475
diff changeset
486 GraalDebugConfig() {
76841bdd5f3e (Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents: 4475
diff changeset
487 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
488 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
489 }
76841bdd5f3e (Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents: 4475
diff changeset
490 }
76841bdd5f3e (Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents: 4475
diff changeset
491
76841bdd5f3e (Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents: 4475
diff changeset
492 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
493 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
494 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
495 }
76841bdd5f3e (Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents: 4475
diff changeset
496
76841bdd5f3e (Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents: 4475
diff changeset
497 GraalFastDebugConfig() {
76841bdd5f3e (Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents: 4475
diff changeset
498 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
499 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
500 }
76841bdd5f3e (Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents: 4475
diff changeset
501 }
76841bdd5f3e (Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents: 4475
diff changeset
502
2027
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
503 class C1DebugConfig extends GenericDebugNonKernelConfig {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
504 String getOptFlag() {
a61af66fc99e Initial load
duke
parents:
diff changeset
505 return getCI().getNoOptFlag();
a61af66fc99e Initial load
duke
parents:
diff changeset
506 }
a61af66fc99e Initial load
duke
parents:
diff changeset
507
a61af66fc99e Initial load
duke
parents:
diff changeset
508 C1DebugConfig() {
2027
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
509 initNames("compiler1", "debug", "jvm.dll");
0
a61af66fc99e Initial load
duke
parents:
diff changeset
510 init(getIncludes(), getDefines());
a61af66fc99e Initial load
duke
parents:
diff changeset
511 }
a61af66fc99e Initial load
duke
parents:
diff changeset
512 }
a61af66fc99e Initial load
duke
parents:
diff changeset
513
2027
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
514 class C1FastDebugConfig extends GenericDebugNonKernelConfig {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
515 String getOptFlag() {
a61af66fc99e Initial load
duke
parents:
diff changeset
516 return getCI().getOptFlag();
a61af66fc99e Initial load
duke
parents:
diff changeset
517 }
a61af66fc99e Initial load
duke
parents:
diff changeset
518
a61af66fc99e Initial load
duke
parents:
diff changeset
519 C1FastDebugConfig() {
2027
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
520 initNames("compiler1", "fastdebug", "jvm.dll");
0
a61af66fc99e Initial load
duke
parents:
diff changeset
521 init(getIncludes(), getDefines());
a61af66fc99e Initial load
duke
parents:
diff changeset
522 }
a61af66fc99e Initial load
duke
parents:
diff changeset
523 }
a61af66fc99e Initial load
duke
parents:
diff changeset
524
2027
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
525 class C2DebugConfig extends GenericDebugNonKernelConfig {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
526 String getOptFlag() {
a61af66fc99e Initial load
duke
parents:
diff changeset
527 return getCI().getNoOptFlag();
a61af66fc99e Initial load
duke
parents:
diff changeset
528 }
a61af66fc99e Initial load
duke
parents:
diff changeset
529
a61af66fc99e Initial load
duke
parents:
diff changeset
530 C2DebugConfig() {
2027
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
531 initNames("compiler2", "debug", "jvm.dll");
0
a61af66fc99e Initial load
duke
parents:
diff changeset
532 init(getIncludes(), getDefines());
a61af66fc99e Initial load
duke
parents:
diff changeset
533 }
a61af66fc99e Initial load
duke
parents:
diff changeset
534 }
a61af66fc99e Initial load
duke
parents:
diff changeset
535
2027
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
536 class C2FastDebugConfig extends GenericDebugNonKernelConfig {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
537 String getOptFlag() {
a61af66fc99e Initial load
duke
parents:
diff changeset
538 return getCI().getOptFlag();
a61af66fc99e Initial load
duke
parents:
diff changeset
539 }
a61af66fc99e Initial load
duke
parents:
diff changeset
540
a61af66fc99e Initial load
duke
parents:
diff changeset
541 C2FastDebugConfig() {
2027
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
542 initNames("compiler2", "fastdebug", "jvm.dll");
0
a61af66fc99e Initial load
duke
parents:
diff changeset
543 init(getIncludes(), getDefines());
a61af66fc99e Initial load
duke
parents:
diff changeset
544 }
a61af66fc99e Initial load
duke
parents:
diff changeset
545 }
a61af66fc99e Initial load
duke
parents:
diff changeset
546
2027
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
547 class TieredDebugConfig extends GenericDebugNonKernelConfig {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
548 String getOptFlag() {
a61af66fc99e Initial load
duke
parents:
diff changeset
549 return getCI().getNoOptFlag();
a61af66fc99e Initial load
duke
parents:
diff changeset
550 }
a61af66fc99e Initial load
duke
parents:
diff changeset
551
a61af66fc99e Initial load
duke
parents:
diff changeset
552 TieredDebugConfig() {
2027
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
553 initNames("tiered", "debug", "jvm.dll");
0
a61af66fc99e Initial load
duke
parents:
diff changeset
554 init(getIncludes(), getDefines());
a61af66fc99e Initial load
duke
parents:
diff changeset
555 }
a61af66fc99e Initial load
duke
parents:
diff changeset
556 }
a61af66fc99e Initial load
duke
parents:
diff changeset
557
2027
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
558 class TieredFastDebugConfig extends GenericDebugNonKernelConfig {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
559 String getOptFlag() {
a61af66fc99e Initial load
duke
parents:
diff changeset
560 return getCI().getOptFlag();
a61af66fc99e Initial load
duke
parents:
diff changeset
561 }
a61af66fc99e Initial load
duke
parents:
diff changeset
562
a61af66fc99e Initial load
duke
parents:
diff changeset
563 TieredFastDebugConfig() {
2027
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
564 initNames("tiered", "fastdebug", "jvm.dll");
0
a61af66fc99e Initial load
duke
parents:
diff changeset
565 init(getIncludes(), getDefines());
a61af66fc99e Initial load
duke
parents:
diff changeset
566 }
a61af66fc99e Initial load
duke
parents:
diff changeset
567 }
a61af66fc99e Initial load
duke
parents:
diff changeset
568
a61af66fc99e Initial load
duke
parents:
diff changeset
569 abstract class ProductConfig extends BuildConfig {
a61af66fc99e Initial load
duke
parents:
diff changeset
570 protected void init(Vector includes, Vector defines) {
a61af66fc99e Initial load
duke
parents:
diff changeset
571 defines.add("NDEBUG");
a61af66fc99e Initial load
duke
parents:
diff changeset
572 defines.add("PRODUCT");
a61af66fc99e Initial load
duke
parents:
diff changeset
573
a61af66fc99e Initial load
duke
parents:
diff changeset
574 super.init(includes, defines);
a61af66fc99e Initial load
duke
parents:
diff changeset
575
a61af66fc99e Initial load
duke
parents:
diff changeset
576 getV("CompilerFlags").addAll(getCI().getProductCompilerFlags());
a61af66fc99e Initial load
duke
parents:
diff changeset
577 getV("LinkerFlags").addAll(getCI().getProductLinkerFlags());
a61af66fc99e Initial load
duke
parents:
diff changeset
578 }
a61af66fc99e Initial load
duke
parents:
diff changeset
579 }
a61af66fc99e Initial load
duke
parents:
diff changeset
580
4572
76841bdd5f3e (Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents: 4475
diff changeset
581 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
582 GraalProductConfig() {
76841bdd5f3e (Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents: 4475
diff changeset
583 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
584 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
585 }
76841bdd5f3e (Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents: 4475
diff changeset
586 }
76841bdd5f3e (Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents: 4475
diff changeset
587
0
a61af66fc99e Initial load
duke
parents:
diff changeset
588 class C1ProductConfig extends ProductConfig {
a61af66fc99e Initial load
duke
parents:
diff changeset
589 C1ProductConfig() {
2027
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
590 initNames("compiler1", "product", "jvm.dll");
0
a61af66fc99e Initial load
duke
parents:
diff changeset
591 init(getIncludes(), getDefines());
a61af66fc99e Initial load
duke
parents:
diff changeset
592 }
a61af66fc99e Initial load
duke
parents:
diff changeset
593 }
a61af66fc99e Initial load
duke
parents:
diff changeset
594
a61af66fc99e Initial load
duke
parents:
diff changeset
595 class C2ProductConfig extends ProductConfig {
a61af66fc99e Initial load
duke
parents:
diff changeset
596 C2ProductConfig() {
2027
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
597 initNames("compiler2", "product", "jvm.dll");
0
a61af66fc99e Initial load
duke
parents:
diff changeset
598 init(getIncludes(), getDefines());
a61af66fc99e Initial load
duke
parents:
diff changeset
599 }
a61af66fc99e Initial load
duke
parents:
diff changeset
600 }
a61af66fc99e Initial load
duke
parents:
diff changeset
601
a61af66fc99e Initial load
duke
parents:
diff changeset
602 class TieredProductConfig extends ProductConfig {
a61af66fc99e Initial load
duke
parents:
diff changeset
603 TieredProductConfig() {
2027
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
604 initNames("tiered", "product", "jvm.dll");
0
a61af66fc99e Initial load
duke
parents:
diff changeset
605 init(getIncludes(), getDefines());
a61af66fc99e Initial load
duke
parents:
diff changeset
606 }
a61af66fc99e Initial load
duke
parents:
diff changeset
607 }
a61af66fc99e Initial load
duke
parents:
diff changeset
608
2027
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
609 class CoreDebugConfig extends GenericDebugNonKernelConfig {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
610 String getOptFlag() {
a61af66fc99e Initial load
duke
parents:
diff changeset
611 return getCI().getNoOptFlag();
a61af66fc99e Initial load
duke
parents:
diff changeset
612 }
a61af66fc99e Initial load
duke
parents:
diff changeset
613
a61af66fc99e Initial load
duke
parents:
diff changeset
614 CoreDebugConfig() {
2027
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
615 initNames("core", "debug", "jvm.dll");
0
a61af66fc99e Initial load
duke
parents:
diff changeset
616 init(getIncludes(), getDefines());
a61af66fc99e Initial load
duke
parents:
diff changeset
617 }
a61af66fc99e Initial load
duke
parents:
diff changeset
618 }
a61af66fc99e Initial load
duke
parents:
diff changeset
619
2027
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
620 class CoreFastDebugConfig extends GenericDebugNonKernelConfig {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
621 String getOptFlag() {
a61af66fc99e Initial load
duke
parents:
diff changeset
622 return getCI().getOptFlag();
a61af66fc99e Initial load
duke
parents:
diff changeset
623 }
a61af66fc99e Initial load
duke
parents:
diff changeset
624
a61af66fc99e Initial load
duke
parents:
diff changeset
625 CoreFastDebugConfig() {
2027
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
626 initNames("core", "fastdebug", "jvm.dll");
0
a61af66fc99e Initial load
duke
parents:
diff changeset
627 init(getIncludes(), getDefines());
a61af66fc99e Initial load
duke
parents:
diff changeset
628 }
a61af66fc99e Initial load
duke
parents:
diff changeset
629 }
a61af66fc99e Initial load
duke
parents:
diff changeset
630
a61af66fc99e Initial load
duke
parents:
diff changeset
631 class CoreProductConfig extends ProductConfig {
a61af66fc99e Initial load
duke
parents:
diff changeset
632 CoreProductConfig() {
2027
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
633 initNames("core", "product", "jvm.dll");
0
a61af66fc99e Initial load
duke
parents:
diff changeset
634 init(getIncludes(), getDefines());
a61af66fc99e Initial load
duke
parents:
diff changeset
635 }
a61af66fc99e Initial load
duke
parents:
diff changeset
636 }
a61af66fc99e Initial load
duke
parents:
diff changeset
637
a61af66fc99e Initial load
duke
parents:
diff changeset
638 class KernelDebugConfig extends GenericDebugConfig {
a61af66fc99e Initial load
duke
parents:
diff changeset
639 String getOptFlag() {
a61af66fc99e Initial load
duke
parents:
diff changeset
640 return getCI().getNoOptFlag();
a61af66fc99e Initial load
duke
parents:
diff changeset
641 }
a61af66fc99e Initial load
duke
parents:
diff changeset
642
a61af66fc99e Initial load
duke
parents:
diff changeset
643 KernelDebugConfig() {
2027
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
644 initNames("kernel", "debug", "jvm.dll");
0
a61af66fc99e Initial load
duke
parents:
diff changeset
645 init(getIncludes(), getDefines());
a61af66fc99e Initial load
duke
parents:
diff changeset
646 }
a61af66fc99e Initial load
duke
parents:
diff changeset
647 }
a61af66fc99e Initial load
duke
parents:
diff changeset
648
a61af66fc99e Initial load
duke
parents:
diff changeset
649
a61af66fc99e Initial load
duke
parents:
diff changeset
650 class KernelFastDebugConfig extends GenericDebugConfig {
a61af66fc99e Initial load
duke
parents:
diff changeset
651 String getOptFlag() {
a61af66fc99e Initial load
duke
parents:
diff changeset
652 return getCI().getOptFlag();
a61af66fc99e Initial load
duke
parents:
diff changeset
653 }
a61af66fc99e Initial load
duke
parents:
diff changeset
654
a61af66fc99e Initial load
duke
parents:
diff changeset
655 KernelFastDebugConfig() {
2027
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
656 initNames("kernel", "fastdebug", "jvm.dll");
0
a61af66fc99e Initial load
duke
parents:
diff changeset
657 init(getIncludes(), getDefines());
a61af66fc99e Initial load
duke
parents:
diff changeset
658 }
a61af66fc99e Initial load
duke
parents:
diff changeset
659 }
a61af66fc99e Initial load
duke
parents:
diff changeset
660
a61af66fc99e Initial load
duke
parents:
diff changeset
661
a61af66fc99e Initial load
duke
parents:
diff changeset
662 class KernelProductConfig extends ProductConfig {
a61af66fc99e Initial load
duke
parents:
diff changeset
663 KernelProductConfig() {
2027
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
664 initNames("kernel", "product", "jvm.dll");
0
a61af66fc99e Initial load
duke
parents:
diff changeset
665 init(getIncludes(), getDefines());
a61af66fc99e Initial load
duke
parents:
diff changeset
666 }
a61af66fc99e Initial load
duke
parents:
diff changeset
667 }
6801
1a9b9cfcef41 7163863: Updated projectcreator
neliasso
parents: 4878
diff changeset
668
0
a61af66fc99e Initial load
duke
parents:
diff changeset
669 abstract class CompilerInterface {
a61af66fc99e Initial load
duke
parents:
diff changeset
670 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
671 abstract Vector getBaseLinkerFlags(String outDir, String outDll, String platformName);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
672 abstract Vector getDebugCompilerFlags(String opt);
a61af66fc99e Initial load
duke
parents:
diff changeset
673 abstract Vector getDebugLinkerFlags();
2027
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
674 abstract void getAdditionalNonKernelLinkerFlags(Vector rv);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
675 abstract Vector getProductCompilerFlags();
a61af66fc99e Initial load
duke
parents:
diff changeset
676 abstract Vector getProductLinkerFlags();
a61af66fc99e Initial load
duke
parents:
diff changeset
677 abstract String getOptFlag();
a61af66fc99e Initial load
duke
parents:
diff changeset
678 abstract String getNoOptFlag();
2233
15d6977f04b0 7017824: Add support for creating 64-bit Visual Studio projects
sla
parents: 2027
diff changeset
679 abstract String makeCfgName(String flavourBuild, String platformName);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
680
a61af66fc99e Initial load
duke
parents:
diff changeset
681 void addAttr(Vector receiver, String attr, String value) {
a61af66fc99e Initial load
duke
parents:
diff changeset
682 receiver.add(attr); receiver.add(value);
a61af66fc99e Initial load
duke
parents:
diff changeset
683 }
2027
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
684 void extAttr(Vector receiver, String attr, String value) {
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
685 int attr_pos=receiver.indexOf(attr) ;
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
686 if ( attr_pos == -1) {
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
687 // 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
688 receiver.add(attr); receiver.add(value);
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
689 } else {
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
690 // 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
691 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
692 }
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
693 }
0
a61af66fc99e Initial load
duke
parents:
diff changeset
694 }