annotate src/share/tools/ProjectCreator/WinGammaPlatformVC7.java @ 2184:5d801e6b9a80

Imported build system changes from other repository.
author Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
date Mon, 21 Feb 2011 19:17:10 +0100
parents 06f017f7daa7
children 2ab52cda08e5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 /*
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
2 * Copyright (c) 2005, 2010, 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.io.FileWriter;
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
26 import java.io.IOException;
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
27 import java.io.PrintWriter;
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
28 import java.util.Hashtable;
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
29 import java.util.Iterator;
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
30 import java.util.TreeSet;
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
31 import java.util.Vector;
0
a61af66fc99e Initial load
duke
parents:
diff changeset
32
a61af66fc99e Initial load
duke
parents:
diff changeset
33 public class WinGammaPlatformVC7 extends WinGammaPlatform {
a61af66fc99e Initial load
duke
parents:
diff changeset
34
659
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
35 String projectVersion() {return "7.10";};
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
36
0
a61af66fc99e Initial load
duke
parents:
diff changeset
37 public void writeProjectFile(String projectFileName, String projectName,
a61af66fc99e Initial load
duke
parents:
diff changeset
38 Vector allConfigs) throws IOException {
a61af66fc99e Initial load
duke
parents:
diff changeset
39 System.out.println();
a61af66fc99e Initial load
duke
parents:
diff changeset
40 System.out.println(" Writing .vcproj file...");
a61af66fc99e Initial load
duke
parents:
diff changeset
41 // If we got this far without an error, we're safe to actually
a61af66fc99e Initial load
duke
parents:
diff changeset
42 // write the .vcproj file
a61af66fc99e Initial load
duke
parents:
diff changeset
43 printWriter = new PrintWriter(new FileWriter(projectFileName));
a61af66fc99e Initial load
duke
parents:
diff changeset
44
a61af66fc99e Initial load
duke
parents:
diff changeset
45 printWriter.println("<?xml version=\"1.0\" encoding=\"windows-1251\"?>");
a61af66fc99e Initial load
duke
parents:
diff changeset
46 startTag(
a61af66fc99e Initial load
duke
parents:
diff changeset
47 "VisualStudioProject",
a61af66fc99e Initial load
duke
parents:
diff changeset
48 new String[] {
a61af66fc99e Initial load
duke
parents:
diff changeset
49 "ProjectType", "Visual C++",
659
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
50 "Version", projectVersion(),
0
a61af66fc99e Initial load
duke
parents:
diff changeset
51 "Name", projectName,
a61af66fc99e Initial load
duke
parents:
diff changeset
52 "ProjectGUID", "{8822CB5C-1C41-41C2-8493-9F6E1994338B}",
a61af66fc99e Initial load
duke
parents:
diff changeset
53 "SccProjectName", "",
a61af66fc99e Initial load
duke
parents:
diff changeset
54 "SccLocalPath", ""
a61af66fc99e Initial load
duke
parents:
diff changeset
55 }
a61af66fc99e Initial load
duke
parents:
diff changeset
56 );
a61af66fc99e Initial load
duke
parents:
diff changeset
57
a61af66fc99e Initial load
duke
parents:
diff changeset
58 startTag("Platforms", null);
1408
0ba67bb5392c added c1x build directory, added MSVC Win64 project support
lstadler
parents: 1406
diff changeset
59 tag("Platform", new String[] {"Name", Util.os()});
0
a61af66fc99e Initial load
duke
parents:
diff changeset
60 endTag("Platforms");
a61af66fc99e Initial load
duke
parents:
diff changeset
61
a61af66fc99e Initial load
duke
parents:
diff changeset
62 startTag("Configurations", null);
a61af66fc99e Initial load
duke
parents:
diff changeset
63
a61af66fc99e Initial load
duke
parents:
diff changeset
64 for (Iterator i = allConfigs.iterator(); i.hasNext(); ) {
a61af66fc99e Initial load
duke
parents:
diff changeset
65 writeConfiguration((BuildConfig)i.next());
a61af66fc99e Initial load
duke
parents:
diff changeset
66 }
a61af66fc99e Initial load
duke
parents:
diff changeset
67
a61af66fc99e Initial load
duke
parents:
diff changeset
68 endTag("Configurations");
a61af66fc99e Initial load
duke
parents:
diff changeset
69
a61af66fc99e Initial load
duke
parents:
diff changeset
70 tag("References", null);
a61af66fc99e Initial load
duke
parents:
diff changeset
71
a61af66fc99e Initial load
duke
parents:
diff changeset
72 writeFiles(allConfigs);
a61af66fc99e Initial load
duke
parents:
diff changeset
73
a61af66fc99e Initial load
duke
parents:
diff changeset
74 tag("Globals", null);
a61af66fc99e Initial load
duke
parents:
diff changeset
75
a61af66fc99e Initial load
duke
parents:
diff changeset
76 endTag("VisualStudioProject");
a61af66fc99e Initial load
duke
parents:
diff changeset
77 printWriter.close();
a61af66fc99e Initial load
duke
parents:
diff changeset
78
a61af66fc99e Initial load
duke
parents:
diff changeset
79 System.out.println(" Done.");
a61af66fc99e Initial load
duke
parents:
diff changeset
80 }
a61af66fc99e Initial load
duke
parents:
diff changeset
81
a61af66fc99e Initial load
duke
parents:
diff changeset
82
a61af66fc99e Initial load
duke
parents:
diff changeset
83 abstract class NameFilter {
a61af66fc99e Initial load
duke
parents:
diff changeset
84 protected String fname;
a61af66fc99e Initial load
duke
parents:
diff changeset
85
a61af66fc99e Initial load
duke
parents:
diff changeset
86 abstract boolean match(FileInfo fi);
a61af66fc99e Initial load
duke
parents:
diff changeset
87
a61af66fc99e Initial load
duke
parents:
diff changeset
88 String filterString() { return ""; }
a61af66fc99e Initial load
duke
parents:
diff changeset
89 String name() { return this.fname;}
a61af66fc99e Initial load
duke
parents:
diff changeset
90 }
a61af66fc99e Initial load
duke
parents:
diff changeset
91
a61af66fc99e Initial load
duke
parents:
diff changeset
92 class DirectoryFilter extends NameFilter {
a61af66fc99e Initial load
duke
parents:
diff changeset
93 String dir;
a61af66fc99e Initial load
duke
parents:
diff changeset
94 int baseLen, dirLen;
a61af66fc99e Initial load
duke
parents:
diff changeset
95
a61af66fc99e Initial load
duke
parents:
diff changeset
96 DirectoryFilter(String dir, String sbase) {
a61af66fc99e Initial load
duke
parents:
diff changeset
97 this.dir = dir;
a61af66fc99e Initial load
duke
parents:
diff changeset
98 this.baseLen = sbase.length();
a61af66fc99e Initial load
duke
parents:
diff changeset
99 this.dirLen = dir.length();
a61af66fc99e Initial load
duke
parents:
diff changeset
100 this.fname = dir;
a61af66fc99e Initial load
duke
parents:
diff changeset
101 }
a61af66fc99e Initial load
duke
parents:
diff changeset
102
a61af66fc99e Initial load
duke
parents:
diff changeset
103 DirectoryFilter(String fname, String dir, String sbase) {
a61af66fc99e Initial load
duke
parents:
diff changeset
104 this.dir = dir;
a61af66fc99e Initial load
duke
parents:
diff changeset
105 this.baseLen = sbase.length();
a61af66fc99e Initial load
duke
parents:
diff changeset
106 this.dirLen = dir.length();
a61af66fc99e Initial load
duke
parents:
diff changeset
107 this.fname = fname;
a61af66fc99e Initial load
duke
parents:
diff changeset
108 }
a61af66fc99e Initial load
duke
parents:
diff changeset
109
a61af66fc99e Initial load
duke
parents:
diff changeset
110
a61af66fc99e Initial load
duke
parents:
diff changeset
111 boolean match(FileInfo fi) {
2027
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
112 int lastSlashIndex = fi.full.lastIndexOf('/');
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
113 String fullDir = fi.full.substring(0, lastSlashIndex);
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
114 return fullDir.endsWith(dir);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
115 }
a61af66fc99e Initial load
duke
parents:
diff changeset
116 }
a61af66fc99e Initial load
duke
parents:
diff changeset
117
a61af66fc99e Initial load
duke
parents:
diff changeset
118 class TypeFilter extends NameFilter {
a61af66fc99e Initial load
duke
parents:
diff changeset
119 String[] exts;
a61af66fc99e Initial load
duke
parents:
diff changeset
120
a61af66fc99e Initial load
duke
parents:
diff changeset
121 TypeFilter(String fname, String[] exts) {
a61af66fc99e Initial load
duke
parents:
diff changeset
122 this.fname = fname;
a61af66fc99e Initial load
duke
parents:
diff changeset
123 this.exts = exts;
a61af66fc99e Initial load
duke
parents:
diff changeset
124 }
a61af66fc99e Initial load
duke
parents:
diff changeset
125
a61af66fc99e Initial load
duke
parents:
diff changeset
126 boolean match(FileInfo fi) {
a61af66fc99e Initial load
duke
parents:
diff changeset
127 for (int i=0; i<exts.length; i++) {
a61af66fc99e Initial load
duke
parents:
diff changeset
128 if (fi.full.endsWith(exts[i])) {
a61af66fc99e Initial load
duke
parents:
diff changeset
129 return true;
a61af66fc99e Initial load
duke
parents:
diff changeset
130 }
a61af66fc99e Initial load
duke
parents:
diff changeset
131 }
a61af66fc99e Initial load
duke
parents:
diff changeset
132 return false;
a61af66fc99e Initial load
duke
parents:
diff changeset
133 }
a61af66fc99e Initial load
duke
parents:
diff changeset
134
a61af66fc99e Initial load
duke
parents:
diff changeset
135 String filterString() {
a61af66fc99e Initial load
duke
parents:
diff changeset
136 return Util.join(";", exts);
a61af66fc99e Initial load
duke
parents:
diff changeset
137 }
a61af66fc99e Initial load
duke
parents:
diff changeset
138 }
a61af66fc99e Initial load
duke
parents:
diff changeset
139
a61af66fc99e Initial load
duke
parents:
diff changeset
140 class TerminatorFilter extends NameFilter {
a61af66fc99e Initial load
duke
parents:
diff changeset
141 TerminatorFilter(String fname) {
a61af66fc99e Initial load
duke
parents:
diff changeset
142 this.fname = fname;
a61af66fc99e Initial load
duke
parents:
diff changeset
143
a61af66fc99e Initial load
duke
parents:
diff changeset
144 }
a61af66fc99e Initial load
duke
parents:
diff changeset
145 boolean match(FileInfo fi) {
a61af66fc99e Initial load
duke
parents:
diff changeset
146 return true;
a61af66fc99e Initial load
duke
parents:
diff changeset
147 }
a61af66fc99e Initial load
duke
parents:
diff changeset
148
a61af66fc99e Initial load
duke
parents:
diff changeset
149 }
a61af66fc99e Initial load
duke
parents:
diff changeset
150
a61af66fc99e Initial load
duke
parents:
diff changeset
151 class SpecificNameFilter extends NameFilter {
a61af66fc99e Initial load
duke
parents:
diff changeset
152 String pats[];
a61af66fc99e Initial load
duke
parents:
diff changeset
153
a61af66fc99e Initial load
duke
parents:
diff changeset
154 SpecificNameFilter(String fname, String[] pats) {
a61af66fc99e Initial load
duke
parents:
diff changeset
155 this.fname = fname;
a61af66fc99e Initial load
duke
parents:
diff changeset
156 this.pats = pats;
a61af66fc99e Initial load
duke
parents:
diff changeset
157 }
a61af66fc99e Initial load
duke
parents:
diff changeset
158
a61af66fc99e Initial load
duke
parents:
diff changeset
159 boolean match(FileInfo fi) {
a61af66fc99e Initial load
duke
parents:
diff changeset
160 for (int i=0; i<pats.length; i++) {
a61af66fc99e Initial load
duke
parents:
diff changeset
161 if (fi.attr.shortName.matches(pats[i])) {
a61af66fc99e Initial load
duke
parents:
diff changeset
162 return true;
a61af66fc99e Initial load
duke
parents:
diff changeset
163 }
a61af66fc99e Initial load
duke
parents:
diff changeset
164 }
a61af66fc99e Initial load
duke
parents:
diff changeset
165 return false;
a61af66fc99e Initial load
duke
parents:
diff changeset
166 }
a61af66fc99e Initial load
duke
parents:
diff changeset
167
a61af66fc99e Initial load
duke
parents:
diff changeset
168 }
a61af66fc99e Initial load
duke
parents:
diff changeset
169
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
170 class SpecificPathFilter extends NameFilter {
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
171 String pats[];
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
172
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
173 SpecificPathFilter(String fname, String[] pats) {
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
174 this.fname = fname;
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
175 this.pats = pats;
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
176 }
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
177
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
178 boolean match(FileInfo fi) {
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
179 for (int i=0; i<pats.length; i++) {
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
180 if (fi.full.matches(pats[i])) {
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
181 return true;
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
182 }
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
183 }
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
184 return false;
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
185 }
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
186
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
187 }
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
188
0
a61af66fc99e Initial load
duke
parents:
diff changeset
189 class ContainerFilter extends NameFilter {
a61af66fc99e Initial load
duke
parents:
diff changeset
190 Vector children;
a61af66fc99e Initial load
duke
parents:
diff changeset
191
a61af66fc99e Initial load
duke
parents:
diff changeset
192 ContainerFilter(String fname) {
a61af66fc99e Initial load
duke
parents:
diff changeset
193 this.fname = fname;
a61af66fc99e Initial load
duke
parents:
diff changeset
194 children = new Vector();
a61af66fc99e Initial load
duke
parents:
diff changeset
195
a61af66fc99e Initial load
duke
parents:
diff changeset
196 }
a61af66fc99e Initial load
duke
parents:
diff changeset
197 boolean match(FileInfo fi) {
a61af66fc99e Initial load
duke
parents:
diff changeset
198 return false;
a61af66fc99e Initial load
duke
parents:
diff changeset
199 }
a61af66fc99e Initial load
duke
parents:
diff changeset
200
a61af66fc99e Initial load
duke
parents:
diff changeset
201 Iterator babies() { return children.iterator(); }
a61af66fc99e Initial load
duke
parents:
diff changeset
202
a61af66fc99e Initial load
duke
parents:
diff changeset
203 void add(NameFilter f) {
a61af66fc99e Initial load
duke
parents:
diff changeset
204 children.add(f);
a61af66fc99e Initial load
duke
parents:
diff changeset
205 }
a61af66fc99e Initial load
duke
parents:
diff changeset
206 }
a61af66fc99e Initial load
duke
parents:
diff changeset
207
a61af66fc99e Initial load
duke
parents:
diff changeset
208
a61af66fc99e Initial load
duke
parents:
diff changeset
209 void writeCustomToolConfig(Vector configs, String[] customToolAttrs) {
a61af66fc99e Initial load
duke
parents:
diff changeset
210 for (Iterator i = configs.iterator(); i.hasNext(); ) {
a61af66fc99e Initial load
duke
parents:
diff changeset
211 startTag("FileConfiguration",
a61af66fc99e Initial load
duke
parents:
diff changeset
212 new String[] {
a61af66fc99e Initial load
duke
parents:
diff changeset
213 "Name", (String)i.next()
a61af66fc99e Initial load
duke
parents:
diff changeset
214 }
a61af66fc99e Initial load
duke
parents:
diff changeset
215 );
a61af66fc99e Initial load
duke
parents:
diff changeset
216 tag("Tool", customToolAttrs);
a61af66fc99e Initial load
duke
parents:
diff changeset
217
a61af66fc99e Initial load
duke
parents:
diff changeset
218 endTag("FileConfiguration");
a61af66fc99e Initial load
duke
parents:
diff changeset
219 }
a61af66fc99e Initial load
duke
parents:
diff changeset
220 }
a61af66fc99e Initial load
duke
parents:
diff changeset
221
a61af66fc99e Initial load
duke
parents:
diff changeset
222 // here we define filters, which define layout of what can be seen in 'Solution View' of MSVC
a61af66fc99e Initial load
duke
parents:
diff changeset
223 // Basically there are two types of entities - container filters and real filters
a61af66fc99e Initial load
duke
parents:
diff changeset
224 // - container filter just provides a container to group together real filters
a61af66fc99e Initial load
duke
parents:
diff changeset
225 // - real filter can select elements from the set according to some rule, put it into XML
a61af66fc99e Initial load
duke
parents:
diff changeset
226 // and remove from the list
2027
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
227 Vector makeFilters(TreeSet<FileInfo> files) {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
228 Vector rv = new Vector();
a61af66fc99e Initial load
duke
parents:
diff changeset
229 String sbase = Util.normalize(BuildConfig.getFieldString(null, "SourceBase")+"/src/");
a61af66fc99e Initial load
duke
parents:
diff changeset
230
2027
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
231 String currentDir = "";
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
232 DirectoryFilter container = null;
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
233 for(FileInfo fileInfo : files) {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
234
2027
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
235 if (!fileInfo.full.startsWith(sbase)) {
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
236 continue;
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
237 }
0
a61af66fc99e Initial load
duke
parents:
diff changeset
238
2027
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
239 int lastSlash = fileInfo.full.lastIndexOf('/');
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
240 String dir = fileInfo.full.substring(sbase.length(), lastSlash);
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
241 if(dir.equals("share/vm")) {
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
242 // skip files directly in share/vm - should only be precompiled.hpp which is handled below
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
243 continue;
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
244 }
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
245 if (!dir.equals(currentDir)) {
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
246 currentDir = dir;
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
247 if (container != null) {
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
248 rv.add(container);
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
249 }
0
a61af66fc99e Initial load
duke
parents:
diff changeset
250
2027
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
251 // remove "share/vm/" from names
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
252 String name = dir;
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
253 if (dir.startsWith("share/vm/")) {
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
254 name = dir.substring("share/vm/".length(), dir.length());
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
255 }
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
256 container = new DirectoryFilter(name, dir, sbase);
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
257 }
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
258 }
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
259 if (container != null) {
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
260 rv.add(container);
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
261 }
0
a61af66fc99e Initial load
duke
parents:
diff changeset
262
1406
35069ca331f2 Hooked C1XCompiler class into the system.
Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
parents: 844
diff changeset
263 rv.add(new DirectoryFilter("C1X", "share/vm/c1x", sbase));
0
a61af66fc99e Initial load
duke
parents:
diff changeset
264 rv.add(new DirectoryFilter("C1", "share/vm/c1", sbase));
a61af66fc99e Initial load
duke
parents:
diff changeset
265
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
266 ContainerFilter generated = new ContainerFilter("Generated");
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
267 ContainerFilter c1Generated = new ContainerFilter("C1");
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
268 c1Generated.add(new SpecificPathFilter("C++ Interpreter Generated", new String[] {".*compiler1/generated/jvmtifiles/bytecodeInterpreterWithChecks.+"}));
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
269 c1Generated.add(new SpecificPathFilter("jvmtifiles", new String[] {".*compiler1/generated/jvmtifiles/.*"}));
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
270 generated.add(c1Generated);
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
271 ContainerFilter c2Generated = new ContainerFilter("C2");
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
272 c2Generated.add(new SpecificPathFilter("C++ Interpreter Generated", new String[] {".*compiler2/generated/jvmtifiles/bytecodeInterpreterWithChecks.+"}));
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
273 c2Generated.add(new SpecificPathFilter("adfiles", new String[] {".*compiler2/generated/adfiles/.*"}));
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
274 c2Generated.add(new SpecificPathFilter("jvmtifiles", new String[] {".*compiler2/generated/jvmtifiles/.*"}));
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
275 generated.add(c2Generated);
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
276 ContainerFilter coreGenerated = new ContainerFilter("Core");
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
277 coreGenerated.add(new SpecificPathFilter("C++ Interpreter Generated", new String[] {".*core/generated/jvmtifiles/bytecodeInterpreterWithChecks.+"}));
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
278 coreGenerated.add(new SpecificPathFilter("jvmtifiles", new String[] {".*core/generated/jvmtifiles/.*"}));
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
279 generated.add(coreGenerated);
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
280 ContainerFilter tieredGenerated = new ContainerFilter("Tiered");
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
281 tieredGenerated.add(new SpecificPathFilter("C++ Interpreter Generated", new String[] {".*tiered/generated/jvmtifiles/bytecodeInterpreterWithChecks.+"}));
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
282 tieredGenerated.add(new SpecificPathFilter("adfiles", new String[] {".*tiered/generated/adfiles/.*"}));
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
283 tieredGenerated.add(new SpecificPathFilter("jvmtifiles", new String[] {".*tiered/generated/jvmtifiles/.*"}));
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
284 generated.add(tieredGenerated);
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
285 ContainerFilter kernelGenerated = new ContainerFilter("Kernel");
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
286 kernelGenerated.add(new SpecificPathFilter("C++ Interpreter Generated", new String[] {".*kernel/generated/jvmtifiles/bytecodeInterpreterWithChecks.+"}));
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
287 kernelGenerated.add(new SpecificPathFilter("jvmtifiles", new String[] {".*kernel/generated/jvmtifiles/.*"}));
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
288 generated.add(kernelGenerated);
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
289 rv.add(generated);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
290
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
291 rv.add(new SpecificNameFilter("Precompiled Header", new String[] {"precompiled.hpp"}));
0
a61af66fc99e Initial load
duke
parents:
diff changeset
292
a61af66fc99e Initial load
duke
parents:
diff changeset
293 // this one is to catch files not caught by other filters
a61af66fc99e Initial load
duke
parents:
diff changeset
294 //rv.add(new TypeFilter("Header Files", new String[] {"h", "hpp", "hxx", "hm", "inl", "fi", "fd"}));
a61af66fc99e Initial load
duke
parents:
diff changeset
295 rv.add(new TerminatorFilter("Source Files"));
a61af66fc99e Initial load
duke
parents:
diff changeset
296
a61af66fc99e Initial load
duke
parents:
diff changeset
297 return rv;
a61af66fc99e Initial load
duke
parents:
diff changeset
298 }
a61af66fc99e Initial load
duke
parents:
diff changeset
299
a61af66fc99e Initial load
duke
parents:
diff changeset
300 void writeFiles(Vector allConfigs) {
a61af66fc99e Initial load
duke
parents:
diff changeset
301
a61af66fc99e Initial load
duke
parents:
diff changeset
302 Hashtable allFiles = computeAttributedFiles(allConfigs);
a61af66fc99e Initial load
duke
parents:
diff changeset
303
a61af66fc99e Initial load
duke
parents:
diff changeset
304 Vector allConfigNames = new Vector();
a61af66fc99e Initial load
duke
parents:
diff changeset
305 for (Iterator i = allConfigs.iterator(); i.hasNext(); ) {
a61af66fc99e Initial load
duke
parents:
diff changeset
306 allConfigNames.add(((BuildConfig)i.next()).get("Name"));
a61af66fc99e Initial load
duke
parents:
diff changeset
307 }
a61af66fc99e Initial load
duke
parents:
diff changeset
308
a61af66fc99e Initial load
duke
parents:
diff changeset
309 TreeSet sortedFiles = sortFiles(allFiles);
a61af66fc99e Initial load
duke
parents:
diff changeset
310
a61af66fc99e Initial load
duke
parents:
diff changeset
311 startTag("Files", null);
a61af66fc99e Initial load
duke
parents:
diff changeset
312
a61af66fc99e Initial load
duke
parents:
diff changeset
313 for (Iterator i = makeFilters(sortedFiles).iterator(); i.hasNext(); ) {
a61af66fc99e Initial load
duke
parents:
diff changeset
314 doWriteFiles(sortedFiles, allConfigNames, (NameFilter)i.next());
a61af66fc99e Initial load
duke
parents:
diff changeset
315 }
a61af66fc99e Initial load
duke
parents:
diff changeset
316
a61af66fc99e Initial load
duke
parents:
diff changeset
317
a61af66fc99e Initial load
duke
parents:
diff changeset
318 startTag("Filter",
a61af66fc99e Initial load
duke
parents:
diff changeset
319 new String[] {
a61af66fc99e Initial load
duke
parents:
diff changeset
320 "Name", "Resource Files",
a61af66fc99e Initial load
duke
parents:
diff changeset
321 "Filter", "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
a61af66fc99e Initial load
duke
parents:
diff changeset
322 }
a61af66fc99e Initial load
duke
parents:
diff changeset
323 );
a61af66fc99e Initial load
duke
parents:
diff changeset
324 endTag("Filter");
a61af66fc99e Initial load
duke
parents:
diff changeset
325
a61af66fc99e Initial load
duke
parents:
diff changeset
326 endTag("Files");
a61af66fc99e Initial load
duke
parents:
diff changeset
327 }
a61af66fc99e Initial load
duke
parents:
diff changeset
328
a61af66fc99e Initial load
duke
parents:
diff changeset
329 void doWriteFiles(TreeSet allFiles, Vector allConfigNames, NameFilter filter) {
a61af66fc99e Initial load
duke
parents:
diff changeset
330 startTag("Filter",
a61af66fc99e Initial load
duke
parents:
diff changeset
331 new String[] {
a61af66fc99e Initial load
duke
parents:
diff changeset
332 "Name", filter.name(),
a61af66fc99e Initial load
duke
parents:
diff changeset
333 "Filter", filter.filterString()
a61af66fc99e Initial load
duke
parents:
diff changeset
334 }
a61af66fc99e Initial load
duke
parents:
diff changeset
335 );
a61af66fc99e Initial load
duke
parents:
diff changeset
336
a61af66fc99e Initial load
duke
parents:
diff changeset
337 if (filter instanceof ContainerFilter) {
a61af66fc99e Initial load
duke
parents:
diff changeset
338
a61af66fc99e Initial load
duke
parents:
diff changeset
339 Iterator i = ((ContainerFilter)filter).babies();
a61af66fc99e Initial load
duke
parents:
diff changeset
340 while (i.hasNext()) {
a61af66fc99e Initial load
duke
parents:
diff changeset
341 doWriteFiles(allFiles, allConfigNames, (NameFilter)i.next());
a61af66fc99e Initial load
duke
parents:
diff changeset
342 }
a61af66fc99e Initial load
duke
parents:
diff changeset
343
a61af66fc99e Initial load
duke
parents:
diff changeset
344 } else {
a61af66fc99e Initial load
duke
parents:
diff changeset
345
a61af66fc99e Initial load
duke
parents:
diff changeset
346 Iterator i = allFiles.iterator();
a61af66fc99e Initial load
duke
parents:
diff changeset
347 while (i.hasNext()) {
a61af66fc99e Initial load
duke
parents:
diff changeset
348 FileInfo fi = (FileInfo)i.next();
a61af66fc99e Initial load
duke
parents:
diff changeset
349
a61af66fc99e Initial load
duke
parents:
diff changeset
350 if (!filter.match(fi)) {
a61af66fc99e Initial load
duke
parents:
diff changeset
351 continue;
a61af66fc99e Initial load
duke
parents:
diff changeset
352 }
a61af66fc99e Initial load
duke
parents:
diff changeset
353
a61af66fc99e Initial load
duke
parents:
diff changeset
354 startTag("File",
a61af66fc99e Initial load
duke
parents:
diff changeset
355 new String[] {
a61af66fc99e Initial load
duke
parents:
diff changeset
356 "RelativePath", fi.full.replace('/', '\\')
a61af66fc99e Initial load
duke
parents:
diff changeset
357 }
a61af66fc99e Initial load
duke
parents:
diff changeset
358 );
a61af66fc99e Initial load
duke
parents:
diff changeset
359
a61af66fc99e Initial load
duke
parents:
diff changeset
360 FileAttribute a = fi.attr;
a61af66fc99e Initial load
duke
parents:
diff changeset
361 if (a.pchRoot) {
a61af66fc99e Initial load
duke
parents:
diff changeset
362 writeCustomToolConfig(allConfigNames,
a61af66fc99e Initial load
duke
parents:
diff changeset
363 new String[] {
a61af66fc99e Initial load
duke
parents:
diff changeset
364 "Name", "VCCLCompilerTool",
a61af66fc99e Initial load
duke
parents:
diff changeset
365 "UsePrecompiledHeader", "1"
a61af66fc99e Initial load
duke
parents:
diff changeset
366 });
a61af66fc99e Initial load
duke
parents:
diff changeset
367 }
a61af66fc99e Initial load
duke
parents:
diff changeset
368
a61af66fc99e Initial load
duke
parents:
diff changeset
369 if (a.noPch) {
a61af66fc99e Initial load
duke
parents:
diff changeset
370 writeCustomToolConfig(allConfigNames,
a61af66fc99e Initial load
duke
parents:
diff changeset
371 new String[] {
a61af66fc99e Initial load
duke
parents:
diff changeset
372 "Name", "VCCLCompilerTool",
a61af66fc99e Initial load
duke
parents:
diff changeset
373 "UsePrecompiledHeader", "0"
a61af66fc99e Initial load
duke
parents:
diff changeset
374 });
a61af66fc99e Initial load
duke
parents:
diff changeset
375 }
a61af66fc99e Initial load
duke
parents:
diff changeset
376
a61af66fc99e Initial load
duke
parents:
diff changeset
377 if (a.configs != null) {
a61af66fc99e Initial load
duke
parents:
diff changeset
378 for (Iterator j=allConfigNames.iterator(); j.hasNext();) {
a61af66fc99e Initial load
duke
parents:
diff changeset
379 String cfg = (String)j.next();
a61af66fc99e Initial load
duke
parents:
diff changeset
380 if (!a.configs.contains(cfg)) {
a61af66fc99e Initial load
duke
parents:
diff changeset
381 startTag("FileConfiguration",
a61af66fc99e Initial load
duke
parents:
diff changeset
382 new String[] {
a61af66fc99e Initial load
duke
parents:
diff changeset
383 "Name", cfg,
a61af66fc99e Initial load
duke
parents:
diff changeset
384 "ExcludedFromBuild", "TRUE"
a61af66fc99e Initial load
duke
parents:
diff changeset
385 });
a61af66fc99e Initial load
duke
parents:
diff changeset
386 endTag("FileConfiguration");
a61af66fc99e Initial load
duke
parents:
diff changeset
387
a61af66fc99e Initial load
duke
parents:
diff changeset
388 }
a61af66fc99e Initial load
duke
parents:
diff changeset
389 }
a61af66fc99e Initial load
duke
parents:
diff changeset
390 }
a61af66fc99e Initial load
duke
parents:
diff changeset
391
a61af66fc99e Initial load
duke
parents:
diff changeset
392 endTag("File");
a61af66fc99e Initial load
duke
parents:
diff changeset
393
a61af66fc99e Initial load
duke
parents:
diff changeset
394 // we not gonna look at this file anymore
a61af66fc99e Initial load
duke
parents:
diff changeset
395 i.remove();
a61af66fc99e Initial load
duke
parents:
diff changeset
396 }
a61af66fc99e Initial load
duke
parents:
diff changeset
397 }
a61af66fc99e Initial load
duke
parents:
diff changeset
398
a61af66fc99e Initial load
duke
parents:
diff changeset
399 endTag("Filter");
a61af66fc99e Initial load
duke
parents:
diff changeset
400 }
a61af66fc99e Initial load
duke
parents:
diff changeset
401
a61af66fc99e Initial load
duke
parents:
diff changeset
402
a61af66fc99e Initial load
duke
parents:
diff changeset
403 void writeConfiguration(BuildConfig cfg) {
a61af66fc99e Initial load
duke
parents:
diff changeset
404 startTag("Configuration",
a61af66fc99e Initial load
duke
parents:
diff changeset
405 new String[] {
a61af66fc99e Initial load
duke
parents:
diff changeset
406 "Name", cfg.get("Name"),
a61af66fc99e Initial load
duke
parents:
diff changeset
407 "OutputDirectory", cfg.get("OutputDir"),
a61af66fc99e Initial load
duke
parents:
diff changeset
408 "IntermediateDirectory", cfg.get("OutputDir"),
a61af66fc99e Initial load
duke
parents:
diff changeset
409 "ConfigurationType", "2",
a61af66fc99e Initial load
duke
parents:
diff changeset
410 "UseOfMFC", "0",
a61af66fc99e Initial load
duke
parents:
diff changeset
411 "ATLMinimizesCRunTimeLibraryUsage", "FALSE"
a61af66fc99e Initial load
duke
parents:
diff changeset
412 }
a61af66fc99e Initial load
duke
parents:
diff changeset
413 );
a61af66fc99e Initial load
duke
parents:
diff changeset
414
a61af66fc99e Initial load
duke
parents:
diff changeset
415
a61af66fc99e Initial load
duke
parents:
diff changeset
416
a61af66fc99e Initial load
duke
parents:
diff changeset
417 tagV("Tool", cfg.getV("CompilerFlags"));
a61af66fc99e Initial load
duke
parents:
diff changeset
418
a61af66fc99e Initial load
duke
parents:
diff changeset
419 tag("Tool",
a61af66fc99e Initial load
duke
parents:
diff changeset
420 new String[] {
a61af66fc99e Initial load
duke
parents:
diff changeset
421 "Name", "VCCustomBuildTool"
a61af66fc99e Initial load
duke
parents:
diff changeset
422 }
a61af66fc99e Initial load
duke
parents:
diff changeset
423 );
a61af66fc99e Initial load
duke
parents:
diff changeset
424
a61af66fc99e Initial load
duke
parents:
diff changeset
425 tagV("Tool", cfg.getV("LinkerFlags"));
a61af66fc99e Initial load
duke
parents:
diff changeset
426
a61af66fc99e Initial load
duke
parents:
diff changeset
427 tag("Tool",
a61af66fc99e Initial load
duke
parents:
diff changeset
428 new String[] {
2027
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
429 "Name", "VCPostBuildEventTool",
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
430 "Description", BuildConfig.getFieldString(null, "PostbuildDescription"),
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
431 //Caution: String.replace(String,String) is available from JDK5 onwards only
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
432 "CommandLine", cfg.expandFormat(BuildConfig.getFieldString(null, "PostbuildCommand").replace
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
433 ("\t", "&#x0D;&#x0A;"))
0
a61af66fc99e Initial load
duke
parents:
diff changeset
434 }
a61af66fc99e Initial load
duke
parents:
diff changeset
435 );
a61af66fc99e Initial load
duke
parents:
diff changeset
436
a61af66fc99e Initial load
duke
parents:
diff changeset
437 tag("Tool",
a61af66fc99e Initial load
duke
parents:
diff changeset
438 new String[] {
a61af66fc99e Initial load
duke
parents:
diff changeset
439 "Name", "VCPreBuildEventTool"
a61af66fc99e Initial load
duke
parents:
diff changeset
440 }
a61af66fc99e Initial load
duke
parents:
diff changeset
441 );
a61af66fc99e Initial load
duke
parents:
diff changeset
442
a61af66fc99e Initial load
duke
parents:
diff changeset
443 tag("Tool",
a61af66fc99e Initial load
duke
parents:
diff changeset
444 new String[] {
a61af66fc99e Initial load
duke
parents:
diff changeset
445 "Name", "VCPreLinkEventTool",
a61af66fc99e Initial load
duke
parents:
diff changeset
446 "Description", BuildConfig.getFieldString(null, "PrelinkDescription"),
659
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
447 //Caution: String.replace(String,String) is available from JDK5 onwards only
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
448 "CommandLine", cfg.expandFormat(BuildConfig.getFieldString(null, "PrelinkCommand").replace
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
449 ("\t", "&#x0D;&#x0A;"))
0
a61af66fc99e Initial load
duke
parents:
diff changeset
450 }
a61af66fc99e Initial load
duke
parents:
diff changeset
451 );
a61af66fc99e Initial load
duke
parents:
diff changeset
452
a61af66fc99e Initial load
duke
parents:
diff changeset
453 tag("Tool",
a61af66fc99e Initial load
duke
parents:
diff changeset
454 new String[] {
a61af66fc99e Initial load
duke
parents:
diff changeset
455 "Name", "VCResourceCompilerTool",
a61af66fc99e Initial load
duke
parents:
diff changeset
456 // XXX???
a61af66fc99e Initial load
duke
parents:
diff changeset
457 "PreprocessorDefinitions", "NDEBUG",
a61af66fc99e Initial load
duke
parents:
diff changeset
458 "Culture", "1033"
a61af66fc99e Initial load
duke
parents:
diff changeset
459 }
a61af66fc99e Initial load
duke
parents:
diff changeset
460 );
a61af66fc99e Initial load
duke
parents:
diff changeset
461
a61af66fc99e Initial load
duke
parents:
diff changeset
462 tag("Tool",
a61af66fc99e Initial load
duke
parents:
diff changeset
463 new String[] {
a61af66fc99e Initial load
duke
parents:
diff changeset
464 "Name", "VCMIDLTool",
a61af66fc99e Initial load
duke
parents:
diff changeset
465 "PreprocessorDefinitions", "NDEBUG",
a61af66fc99e Initial load
duke
parents:
diff changeset
466 "MkTypLibCompatible", "TRUE",
a61af66fc99e Initial load
duke
parents:
diff changeset
467 "SuppressStartupBanner", "TRUE",
1408
0ba67bb5392c added c1x build directory, added MSVC Win64 project support
lstadler
parents: 1406
diff changeset
468 "TargetEnvironment", Util.os().equals("Win32") ? "1" : "3",
0
a61af66fc99e Initial load
duke
parents:
diff changeset
469 "TypeLibraryName", cfg.get("OutputDir") + Util.sep + "vm.tlb",
a61af66fc99e Initial load
duke
parents:
diff changeset
470 "HeaderFileName", ""
a61af66fc99e Initial load
duke
parents:
diff changeset
471 }
a61af66fc99e Initial load
duke
parents:
diff changeset
472 );
a61af66fc99e Initial load
duke
parents:
diff changeset
473
a61af66fc99e Initial load
duke
parents:
diff changeset
474 endTag("Configuration");
a61af66fc99e Initial load
duke
parents:
diff changeset
475 }
a61af66fc99e Initial load
duke
parents:
diff changeset
476
a61af66fc99e Initial load
duke
parents:
diff changeset
477 int indent;
a61af66fc99e Initial load
duke
parents:
diff changeset
478
a61af66fc99e Initial load
duke
parents:
diff changeset
479 private void startTagPrim(String name,
a61af66fc99e Initial load
duke
parents:
diff changeset
480 String[] attrs,
a61af66fc99e Initial load
duke
parents:
diff changeset
481 boolean close) {
a61af66fc99e Initial load
duke
parents:
diff changeset
482 doIndent();
a61af66fc99e Initial load
duke
parents:
diff changeset
483 printWriter.print("<"+name);
a61af66fc99e Initial load
duke
parents:
diff changeset
484 indent++;
a61af66fc99e Initial load
duke
parents:
diff changeset
485
a61af66fc99e Initial load
duke
parents:
diff changeset
486 if (attrs != null) {
a61af66fc99e Initial load
duke
parents:
diff changeset
487 printWriter.println();
a61af66fc99e Initial load
duke
parents:
diff changeset
488 for (int i=0; i<attrs.length; i+=2) {
a61af66fc99e Initial load
duke
parents:
diff changeset
489 doIndent();
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
490 printWriter.print(" " + attrs[i]+"=\""+attrs[i+1]+"\"");
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
491 if (i < attrs.length - 2) {
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
492 printWriter.println();
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
493 }
0
a61af66fc99e Initial load
duke
parents:
diff changeset
494 }
a61af66fc99e Initial load
duke
parents:
diff changeset
495 }
a61af66fc99e Initial load
duke
parents:
diff changeset
496
a61af66fc99e Initial load
duke
parents:
diff changeset
497 if (close) {
a61af66fc99e Initial load
duke
parents:
diff changeset
498 indent--;
a61af66fc99e Initial load
duke
parents:
diff changeset
499 //doIndent();
a61af66fc99e Initial load
duke
parents:
diff changeset
500 printWriter.println("/>");
a61af66fc99e Initial load
duke
parents:
diff changeset
501 } else {
a61af66fc99e Initial load
duke
parents:
diff changeset
502 //doIndent();
a61af66fc99e Initial load
duke
parents:
diff changeset
503 printWriter.println(">");
a61af66fc99e Initial load
duke
parents:
diff changeset
504 }
a61af66fc99e Initial load
duke
parents:
diff changeset
505 }
a61af66fc99e Initial load
duke
parents:
diff changeset
506
a61af66fc99e Initial load
duke
parents:
diff changeset
507 void startTag(String name, String[] attrs) {
a61af66fc99e Initial load
duke
parents:
diff changeset
508 startTagPrim(name, attrs, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
509 }
a61af66fc99e Initial load
duke
parents:
diff changeset
510
a61af66fc99e Initial load
duke
parents:
diff changeset
511 void startTagV(String name, Vector attrs) {
a61af66fc99e Initial load
duke
parents:
diff changeset
512 String s[] = new String [attrs.size()];
a61af66fc99e Initial load
duke
parents:
diff changeset
513 for (int i=0; i<attrs.size(); i++) {
a61af66fc99e Initial load
duke
parents:
diff changeset
514 s[i] = (String)attrs.elementAt(i);
a61af66fc99e Initial load
duke
parents:
diff changeset
515 }
a61af66fc99e Initial load
duke
parents:
diff changeset
516 startTagPrim(name, s, false);
a61af66fc99e Initial load
duke
parents:
diff changeset
517 }
a61af66fc99e Initial load
duke
parents:
diff changeset
518
a61af66fc99e Initial load
duke
parents:
diff changeset
519 void endTag(String name) {
a61af66fc99e Initial load
duke
parents:
diff changeset
520 indent--;
a61af66fc99e Initial load
duke
parents:
diff changeset
521 doIndent();
a61af66fc99e Initial load
duke
parents:
diff changeset
522 printWriter.println("</"+name+">");
a61af66fc99e Initial load
duke
parents:
diff changeset
523 }
a61af66fc99e Initial load
duke
parents:
diff changeset
524
a61af66fc99e Initial load
duke
parents:
diff changeset
525 void tag(String name, String[] attrs) {
a61af66fc99e Initial load
duke
parents:
diff changeset
526 startTagPrim(name, attrs, true);
a61af66fc99e Initial load
duke
parents:
diff changeset
527 }
a61af66fc99e Initial load
duke
parents:
diff changeset
528
a61af66fc99e Initial load
duke
parents:
diff changeset
529 void tagV(String name, Vector attrs) {
a61af66fc99e Initial load
duke
parents:
diff changeset
530 String s[] = new String [attrs.size()];
a61af66fc99e Initial load
duke
parents:
diff changeset
531 for (int i=0; i<attrs.size(); i++) {
a61af66fc99e Initial load
duke
parents:
diff changeset
532 s[i] = (String)attrs.elementAt(i);
a61af66fc99e Initial load
duke
parents:
diff changeset
533 }
a61af66fc99e Initial load
duke
parents:
diff changeset
534 startTagPrim(name, s, true);
a61af66fc99e Initial load
duke
parents:
diff changeset
535 }
a61af66fc99e Initial load
duke
parents:
diff changeset
536
a61af66fc99e Initial load
duke
parents:
diff changeset
537
a61af66fc99e Initial load
duke
parents:
diff changeset
538 void doIndent() {
a61af66fc99e Initial load
duke
parents:
diff changeset
539 for (int i=0; i<indent; i++) {
a61af66fc99e Initial load
duke
parents:
diff changeset
540 printWriter.print(" ");
a61af66fc99e Initial load
duke
parents:
diff changeset
541 }
a61af66fc99e Initial load
duke
parents:
diff changeset
542 }
a61af66fc99e Initial load
duke
parents:
diff changeset
543
a61af66fc99e Initial load
duke
parents:
diff changeset
544 protected String getProjectExt() {
a61af66fc99e Initial load
duke
parents:
diff changeset
545 return ".vcproj";
a61af66fc99e Initial load
duke
parents:
diff changeset
546 }
a61af66fc99e Initial load
duke
parents:
diff changeset
547 }
a61af66fc99e Initial load
duke
parents:
diff changeset
548
a61af66fc99e Initial load
duke
parents:
diff changeset
549 class CompilerInterfaceVC7 extends CompilerInterface {
659
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
550 void getBaseCompilerFlags_common(Vector defines, Vector includes, String outDir,Vector rv) {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
551
a61af66fc99e Initial load
duke
parents:
diff changeset
552 // advanced M$ IDE (2003) can only recognize name if it's first or
a61af66fc99e Initial load
duke
parents:
diff changeset
553 // second attribute in the tag - go guess
a61af66fc99e Initial load
duke
parents:
diff changeset
554 addAttr(rv, "Name", "VCCLCompilerTool");
a61af66fc99e Initial load
duke
parents:
diff changeset
555 addAttr(rv, "AdditionalIncludeDirectories", Util.join(",", includes));
659
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
556 addAttr(rv, "PreprocessorDefinitions",
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
557 Util.join(";", defines).replace("\"","&quot;"));
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
558 addAttr(rv, "PrecompiledHeaderThrough", "precompiled.hpp");
0
a61af66fc99e Initial load
duke
parents:
diff changeset
559 addAttr(rv, "PrecompiledHeaderFile", outDir+Util.sep+"vm.pch");
a61af66fc99e Initial load
duke
parents:
diff changeset
560 addAttr(rv, "AssemblerListingLocation", outDir);
a61af66fc99e Initial load
duke
parents:
diff changeset
561 addAttr(rv, "ObjectFile", outDir+Util.sep);
2027
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
562 addAttr(rv, "ProgramDataBaseFileName", outDir+Util.sep+"jvm.pdb");
659
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
563 // Set /nologo optin
0
a61af66fc99e Initial load
duke
parents:
diff changeset
564 addAttr(rv, "SuppressStartupBanner", "TRUE");
659
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
565 // Surpass the default /Tc or /Tp. 0 is compileAsDefault
0
a61af66fc99e Initial load
duke
parents:
diff changeset
566 addAttr(rv, "CompileAs", "0");
659
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
567 // Set /W3 option. 3 is warningLevel_3
0
a61af66fc99e Initial load
duke
parents:
diff changeset
568 addAttr(rv, "WarningLevel", "3");
659
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
569 // Set /WX option,
0
a61af66fc99e Initial load
duke
parents:
diff changeset
570 addAttr(rv, "WarnAsError", "TRUE");
659
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
571 // Set /GS option
0
a61af66fc99e Initial load
duke
parents:
diff changeset
572 addAttr(rv, "BufferSecurityCheck", "FALSE");
659
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
573 // Set /Zi option. 3 is debugEnabled
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
574 addAttr(rv, "DebugInformationFormat", "3");
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
575 }
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
576 Vector getBaseCompilerFlags(Vector defines, Vector includes, String outDir) {
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
577 Vector rv = new Vector();
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
578
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
579 getBaseCompilerFlags_common(defines,includes, outDir, rv);
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
580 // Set /Yu option. 3 is pchUseUsingSpecific
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
581 // Note: Starting VC8 pchUseUsingSpecific is 2 !!!
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
582 addAttr(rv, "UsePrecompiledHeader", "3");
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
583 // Set /EHsc- option
0
a61af66fc99e Initial load
duke
parents:
diff changeset
584 addAttr(rv, "ExceptionHandling", "FALSE");
a61af66fc99e Initial load
duke
parents:
diff changeset
585
a61af66fc99e Initial load
duke
parents:
diff changeset
586 return rv;
a61af66fc99e Initial load
duke
parents:
diff changeset
587 }
a61af66fc99e Initial load
duke
parents:
diff changeset
588
a61af66fc99e Initial load
duke
parents:
diff changeset
589 Vector getBaseLinkerFlags(String outDir, String outDll) {
a61af66fc99e Initial load
duke
parents:
diff changeset
590 Vector rv = new Vector();
a61af66fc99e Initial load
duke
parents:
diff changeset
591
a61af66fc99e Initial load
duke
parents:
diff changeset
592 addAttr(rv, "Name", "VCLinkerTool");
a61af66fc99e Initial load
duke
parents:
diff changeset
593 addAttr(rv, "AdditionalOptions",
a61af66fc99e Initial load
duke
parents:
diff changeset
594 "/export:JNI_GetDefaultJavaVMInitArgs " +
a61af66fc99e Initial load
duke
parents:
diff changeset
595 "/export:JNI_CreateJavaVM " +
2027
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
596 "/export:JVM_FindClassFromBootLoader "+
0
a61af66fc99e Initial load
duke
parents:
diff changeset
597 "/export:JNI_GetCreatedJavaVMs "+
a61af66fc99e Initial load
duke
parents:
diff changeset
598 "/export:jio_snprintf /export:jio_printf "+
a61af66fc99e Initial load
duke
parents:
diff changeset
599 "/export:jio_fprintf /export:jio_vfprintf "+
2027
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
600 "/export:jio_vsnprintf "+
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
601 "/export:JVM_GetVersionInfo "+
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
602 "/export:JVM_GetThreadStateNames "+
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
603 "/export:JVM_GetThreadStateValues "+
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
604 "/export:JVM_InitAgentProperties ");
0
a61af66fc99e Initial load
duke
parents:
diff changeset
605 addAttr(rv, "AdditionalDependencies", "Wsock32.lib winmm.lib");
a61af66fc99e Initial load
duke
parents:
diff changeset
606 addAttr(rv, "OutputFile", outDll);
659
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
607 // Set /INCREMENTAL option. 1 is linkIncrementalNo
0
a61af66fc99e Initial load
duke
parents:
diff changeset
608 addAttr(rv, "LinkIncremental", "1");
a61af66fc99e Initial load
duke
parents:
diff changeset
609 addAttr(rv, "SuppressStartupBanner", "TRUE");
a61af66fc99e Initial load
duke
parents:
diff changeset
610 addAttr(rv, "ModuleDefinitionFile", outDir+Util.sep+"vm.def");
2027
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
611 addAttr(rv, "ProgramDatabaseFile", outDir+Util.sep+"jvm.pdb");
659
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
612 // Set /SUBSYSTEM option. 2 is subSystemWindows
0
a61af66fc99e Initial load
duke
parents:
diff changeset
613 addAttr(rv, "SubSystem", "2");
a61af66fc99e Initial load
duke
parents:
diff changeset
614 addAttr(rv, "BaseAddress", "0x8000000");
a61af66fc99e Initial load
duke
parents:
diff changeset
615 addAttr(rv, "ImportLibrary", outDir+Util.sep+"jvm.lib");
659
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
616 // Set /MACHINE option. 1 is machineX86
1408
0ba67bb5392c added c1x build directory, added MSVC Win64 project support
lstadler
parents: 1406
diff changeset
617 addAttr(rv, "TargetMachine", Util.os().equals("Win32") ? "1" : "17");
0
a61af66fc99e Initial load
duke
parents:
diff changeset
618
a61af66fc99e Initial load
duke
parents:
diff changeset
619 return rv;
a61af66fc99e Initial load
duke
parents:
diff changeset
620 }
a61af66fc99e Initial load
duke
parents:
diff changeset
621
659
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
622 void getDebugCompilerFlags_common(String opt,Vector rv) {
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
623
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
624 // Set /On option
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
625 addAttr(rv, "Optimization", opt);
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
626 // Set /FR option. 1 is brAllInfo
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
627 addAttr(rv, "BrowseInformation", "1");
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
628 addAttr(rv, "BrowseInformationFile", "$(IntDir)" + Util.sep);
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
629 // Set /MD option. 2 is rtMultiThreadedDLL
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
630 addAttr(rv, "RuntimeLibrary", "2");
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
631 // Set /Oy- option
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
632 addAttr(rv, "OmitFramePointers", "FALSE");
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
633
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
634 }
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
635
0
a61af66fc99e Initial load
duke
parents:
diff changeset
636 Vector getDebugCompilerFlags(String opt) {
a61af66fc99e Initial load
duke
parents:
diff changeset
637 Vector rv = new Vector();
a61af66fc99e Initial load
duke
parents:
diff changeset
638
659
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
639 getDebugCompilerFlags_common(opt,rv);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
640
a61af66fc99e Initial load
duke
parents:
diff changeset
641 return rv;
a61af66fc99e Initial load
duke
parents:
diff changeset
642 }
a61af66fc99e Initial load
duke
parents:
diff changeset
643
a61af66fc99e Initial load
duke
parents:
diff changeset
644 Vector getDebugLinkerFlags() {
a61af66fc99e Initial load
duke
parents:
diff changeset
645 Vector rv = new Vector();
a61af66fc99e Initial load
duke
parents:
diff changeset
646
659
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
647 addAttr(rv, "GenerateDebugInformation", "TRUE"); // == /DEBUG option
0
a61af66fc99e Initial load
duke
parents:
diff changeset
648
a61af66fc99e Initial load
duke
parents:
diff changeset
649 return rv;
a61af66fc99e Initial load
duke
parents:
diff changeset
650 }
a61af66fc99e Initial load
duke
parents:
diff changeset
651
2027
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
652 void getAdditionalNonKernelLinkerFlags(Vector rv) {
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
653 extAttr(rv, "AdditionalOptions",
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
654 "/export:AsyncGetCallTrace ");
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
655 }
aa6e219afbf1 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 1972
diff changeset
656
659
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
657 void getProductCompilerFlags_common(Vector rv) {
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
658 // Set /O2 option. 2 is optimizeMaxSpeed
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
659 addAttr(rv, "Optimization", "2");
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
660 // Set /Oy- option
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
661 addAttr(rv, "OmitFramePointers", "FALSE");
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
662 }
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
663
0
a61af66fc99e Initial load
duke
parents:
diff changeset
664 Vector getProductCompilerFlags() {
a61af66fc99e Initial load
duke
parents:
diff changeset
665 Vector rv = new Vector();
a61af66fc99e Initial load
duke
parents:
diff changeset
666
659
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
667 getProductCompilerFlags_common(rv);
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
668 // Set /Ob option. 1 is expandOnlyInline
0
a61af66fc99e Initial load
duke
parents:
diff changeset
669 addAttr(rv, "InlineFunctionExpansion", "1");
659
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
670 // Set /GF option.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
671 addAttr(rv, "StringPooling", "TRUE");
659
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
672 // Set /MD option. 2 is rtMultiThreadedDLL
0
a61af66fc99e Initial load
duke
parents:
diff changeset
673 addAttr(rv, "RuntimeLibrary", "2");
659
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
674 // Set /Gy option
0
a61af66fc99e Initial load
duke
parents:
diff changeset
675 addAttr(rv, "EnableFunctionLevelLinking", "TRUE");
a61af66fc99e Initial load
duke
parents:
diff changeset
676
a61af66fc99e Initial load
duke
parents:
diff changeset
677 return rv;
a61af66fc99e Initial load
duke
parents:
diff changeset
678 }
a61af66fc99e Initial load
duke
parents:
diff changeset
679
a61af66fc99e Initial load
duke
parents:
diff changeset
680 Vector getProductLinkerFlags() {
a61af66fc99e Initial load
duke
parents:
diff changeset
681 Vector rv = new Vector();
a61af66fc99e Initial load
duke
parents:
diff changeset
682
659
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
683 // Set /OPT:REF option. 2 is optReferences
0
a61af66fc99e Initial load
duke
parents:
diff changeset
684 addAttr(rv, "OptimizeReferences", "2");
659
520d43965b1f 6812297: update project creation for Visual Studio 2005-2008
ikrylov
parents: 0
diff changeset
685 // Set /OPT:optFolding option. 2 is optFolding
0
a61af66fc99e Initial load
duke
parents:
diff changeset
686 addAttr(rv, "EnableCOMDATFolding", "2");
a61af66fc99e Initial load
duke
parents:
diff changeset
687
a61af66fc99e Initial load
duke
parents:
diff changeset
688 return rv;
a61af66fc99e Initial load
duke
parents:
diff changeset
689 }
a61af66fc99e Initial load
duke
parents:
diff changeset
690
a61af66fc99e Initial load
duke
parents:
diff changeset
691 String getOptFlag() {
a61af66fc99e Initial load
duke
parents:
diff changeset
692 return "2";
a61af66fc99e Initial load
duke
parents:
diff changeset
693 }
a61af66fc99e Initial load
duke
parents:
diff changeset
694
a61af66fc99e Initial load
duke
parents:
diff changeset
695 String getNoOptFlag() {
a61af66fc99e Initial load
duke
parents:
diff changeset
696 return "0";
a61af66fc99e Initial load
duke
parents:
diff changeset
697 }
a61af66fc99e Initial load
duke
parents:
diff changeset
698
a61af66fc99e Initial load
duke
parents:
diff changeset
699 String makeCfgName(String flavourBuild) {
1408
0ba67bb5392c added c1x build directory, added MSVC Win64 project support
lstadler
parents: 1406
diff changeset
700 return flavourBuild + "|" + Util.os();
0
a61af66fc99e Initial load
duke
parents:
diff changeset
701 }
a61af66fc99e Initial load
duke
parents:
diff changeset
702 }