Mercurial > hg > truffle
annotate make/windows/build.make @ 8164:25fd899b979f
Move reusable parts of LIRInstructionClass into base class.
author | Roland Schatz <roland.schatz@oracle.com> |
---|---|
date | Thu, 07 Mar 2013 15:16:18 +0100 |
parents | 989155e2d07a |
children | b9a918201d47 |
rev | line source |
---|---|
0 | 1 # |
6020
d652a62d6e03
7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents:
3310
diff
changeset
|
2 # Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. |
0 | 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 # | |
5 # This code is free software; you can redistribute it and/or modify it | |
6 # under the terms of the GNU General Public License version 2 only, as | |
7 # published by the Free Software Foundation. | |
8 # | |
9 # This code is distributed in the hope that it will be useful, but WITHOUT | |
10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
12 # version 2 for more details (a copy is included in the LICENSE file that | |
13 # accompanied this code). | |
14 # | |
15 # You should have received a copy of the GNU General Public License version | |
16 # 2 along with this work; if not, write to the Free Software Foundation, | |
17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
18 # | |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1328
diff
changeset
|
19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1328
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:
1328
diff
changeset
|
21 # questions. |
1783 | 22 # |
0 | 23 # |
24 | |
25 # Note: this makefile is invoked both from build.bat and from the J2SE | |
26 # control workspace in exactly the same manner; the required | |
27 # environment variables (Variant, WorkSpace, BootStrapDir, BuildUser, HOTSPOT_BUILD_VERSION) | |
28 # are passed in as command line arguments. | |
29 | |
1328
39e409a664b3
6938185: 3/4 6923488 breaks Windows command shell builds
dcubed
parents:
1322
diff
changeset
|
30 # Note: Running nmake or build.bat from the Windows command shell requires |
39e409a664b3
6938185: 3/4 6923488 breaks Windows command shell builds
dcubed
parents:
1322
diff
changeset
|
31 # that "sh" be accessible on the PATH. An MKS install does this. |
39e409a664b3
6938185: 3/4 6923488 breaks Windows command shell builds
dcubed
parents:
1322
diff
changeset
|
32 |
0 | 33 # SA components are built if BUILD_WIN_SA=1 is specified. |
34 # See notes in README. This produces files: | |
35 # 1. sa-jdi.jar - This is built before building jvm.dll | |
7408
892acf0431ef
7153050: remove crufty '_g' support from HotSpot repo makefiles
dcubed
parents:
6022
diff
changeset
|
36 # 2. sawindbg.dll - Native library for SA - This is built after jvm.dll |
0 | 37 # - Also, .lib, .map, .pdb. |
38 # | |
39 # Please refer to ./makefiles/sa.make | |
40 | |
41 # If we haven't set an ARCH yet use x86 | |
42 # create.bat and build.bat will set it, if used. | |
43 !ifndef ARCH | |
44 ARCH=x86 | |
45 !endif | |
46 | |
47 | |
48 # Must be one of these values (if value comes in from env, can't trust it) | |
49 !if "$(ARCH)" != "x86" | |
50 !if "$(ARCH)" != "ia64" | |
51 ARCH=x86 | |
52 !endif | |
53 !endif | |
54 | |
55 # At this point we should be certain that ARCH has a definition | |
56 # now determine the BUILDARCH | |
57 # | |
58 | |
59 # the default BUILDARCH | |
60 BUILDARCH=i486 | |
61 | |
62 # Allow control workspace to force Itanium or AMD64 builds with LP64 | |
63 ARCH_TEXT= | |
64 !ifdef LP64 | |
65 !if "$(LP64)" == "1" | |
66 ARCH_TEXT=64-Bit | |
67 !if "$(ARCH)" == "x86" | |
68 BUILDARCH=amd64 | |
69 !else | |
70 BUILDARCH=ia64 | |
71 !endif | |
72 !endif | |
73 !endif | |
74 | |
75 !if "$(BUILDARCH)" != "ia64" | |
76 !ifndef CC_INTERP | |
1918 | 77 !ifndef FORCE_TIERED |
0 | 78 FORCE_TIERED=1 |
79 !endif | |
80 !endif | |
1918 | 81 !endif |
0 | 82 |
83 !if "$(BUILDARCH)" == "amd64" | |
84 Platform_arch=x86 | |
85 Platform_arch_model=x86_64 | |
86 !endif | |
87 !if "$(BUILDARCH)" == "i486" | |
88 Platform_arch=x86 | |
89 Platform_arch_model=x86_32 | |
90 !endif | |
91 | |
92 # Supply these from the command line or the environment | |
93 # It doesn't make sense to default this one | |
94 Variant= | |
95 # It doesn't make sense to default this one | |
96 WorkSpace= | |
97 | |
98 variantDir = windows_$(BUILDARCH)_$(Variant) | |
99 | |
100 realVariant=$(Variant) | |
101 VARIANT_TEXT=Core | |
102 !if "$(Variant)" == "compiler1" | |
103 VARIANT_TEXT=Client | |
104 !elseif "$(Variant)" == "compiler2" | |
1918 | 105 !if "$(FORCE_TIERED)" == "1" |
0 | 106 VARIANT_TEXT=Server |
107 realVariant=tiered | |
108 !else | |
109 VARIANT_TEXT=Server | |
110 !endif | |
111 !elseif "$(Variant)" == "tiered" | |
112 VARIANT_TEXT=Tiered | |
113 !elseif "$(Variant)" == "kernel" | |
114 VARIANT_TEXT=Kernel | |
4572
76841bdd5f3e
(Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents:
3310
diff
changeset
|
115 !elseif "$(Variant)" == "graal" |
76841bdd5f3e
(Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents:
3310
diff
changeset
|
116 VARIANT_TEXT=Graal |
0 | 117 !endif |
118 | |
119 ######################################################################### | |
7408
892acf0431ef
7153050: remove crufty '_g' support from HotSpot repo makefiles
dcubed
parents:
6022
diff
changeset
|
120 # Parameters for VERSIONINFO resource for jvm.dll. |
0 | 121 # These can be overridden via the nmake.exe command line. |
122 # They are overridden by RE during the control builds. | |
123 # | |
124 !include "$(WorkSpace)/make/hotspot_version" | |
125 | |
91
a294fd0c4b38
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
0
diff
changeset
|
126 # Define HOTSPOT_VM_DISTRO based on settings in make/openjdk_distro |
a294fd0c4b38
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
0
diff
changeset
|
127 # or make/hotspot_distro. |
0 | 128 !ifndef HOTSPOT_VM_DISTRO |
91
a294fd0c4b38
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
0
diff
changeset
|
129 !if exists($(WorkSpace)\src\closed) |
3310 | 130 |
131 # if the build is for JDK6 or earlier version, it should include jdk6_hotspot_distro, | |
132 # instead of hotspot_distro. | |
133 JDK6_OR_EARLIER=0 | |
134 !if "$(JDK_MAJOR_VERSION)" != "" && "$(JDK_MINOR_VERSION)" != "" && "$(JDK_MICRO_VERSION)" != "" | |
135 !if $(JDK_MAJOR_VERSION) == 1 && $(JDK_MINOR_VERSION) < 7 | |
136 JDK6_OR_EARLIER=1 | |
137 !endif | |
138 !else | |
139 !if $(JDK_MAJOR_VER) == 1 && $(JDK_MINOR_VER) < 7 | |
140 JDK6_OR_EARLIER=1 | |
141 !endif | |
142 !endif | |
143 | |
144 !if $(JDK6_OR_EARLIER) == 1 | |
145 !include $(WorkSpace)\make\jdk6_hotspot_distro | |
146 !else | |
91
a294fd0c4b38
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
0
diff
changeset
|
147 !include $(WorkSpace)\make\hotspot_distro |
3310 | 148 !endif |
0 | 149 !else |
91
a294fd0c4b38
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
0
diff
changeset
|
150 !include $(WorkSpace)\make\openjdk_distro |
0 | 151 !endif |
152 !endif | |
153 | |
154 # Following the Web Start / Plugin model here.... | |
155 # We can have update versions like "01a", but Windows requires | |
156 # we use only integers in the file version field. So: | |
157 # JDK_UPDATE_VER = JDK_UPDATE_VERSION * 10 + EXCEPTION_VERSION | |
1783 | 158 # |
0 | 159 JDK_UPDATE_VER=0 |
160 JDK_BUILD_NUMBER=0 | |
161 | |
162 HS_FILEDESC=$(HOTSPOT_VM_DISTRO) $(ARCH_TEXT) $(VARIANT_TEXT) VM | |
163 | |
164 # JDK ProductVersion: | |
165 # 1.5.0_<wx>-b<yz> will have DLL version 5.0.wx*10.yz | |
166 # Thus, 1.5.0_10-b04 will be 5.0.100.4 | |
167 # 1.6.0-b01 will be 6.0.0.1 | |
168 # 1.6.0_01a-b02 will be 6.0.11.2 | |
169 # | |
170 # JDK_* variables are defined in make/hotspot_version or on command line | |
1783 | 171 # |
0 | 172 JDK_VER=$(JDK_MINOR_VER),$(JDK_MICRO_VER),$(JDK_UPDATE_VER),$(JDK_BUILD_NUMBER) |
173 JDK_DOTVER=$(JDK_MINOR_VER).$(JDK_MICRO_VER).$(JDK_UPDATE_VER).$(JDK_BUILD_NUMBER) | |
174 !if "$(JRE_RELEASE_VERSION)" == "" | |
175 JRE_RELEASE_VER=$(JDK_MAJOR_VER).$(JDK_MINOR_VER).$(JDK_MICRO_VER) | |
176 !else | |
177 JRE_RELEASE_VER=$(JRE_RELEASE_VERSION) | |
178 !endif | |
179 !if "$(JDK_MKTG_VERSION)" == "" | |
180 JDK_MKTG_VERSION=$(JDK_MINOR_VER).$(JDK_MICRO_VER) | |
181 !endif | |
182 | |
183 # Hotspot Express VM FileVersion: | |
184 # 10.0-b<yz> will have DLL version 10.0.0.yz (need 4 numbers). | |
1783 | 185 # |
0 | 186 # HS_* variables are defined in make/hotspot_version |
187 # | |
188 HS_VER=$(HS_MAJOR_VER),$(HS_MINOR_VER),0,$(HS_BUILD_NUMBER) | |
189 HS_DOTVER=$(HS_MAJOR_VER).$(HS_MINOR_VER).0.$(HS_BUILD_NUMBER) | |
190 | |
191 !if "$(HOTSPOT_RELEASE_VERSION)" == "" | |
192 HOTSPOT_RELEASE_VERSION=$(HS_MAJOR_VER).$(HS_MINOR_VER)-b$(HS_BUILD_NUMBER) | |
193 !endif | |
194 | |
195 !if "$(HOTSPOT_BUILD_VERSION)" == "" | |
196 HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION) | |
197 !else | |
198 HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION)-$(HOTSPOT_BUILD_VERSION) | |
199 !endif | |
200 | |
201 # End VERSIONINFO parameters | |
202 | |
203 | |
204 # We don't support SA on ia64, and we can't | |
1783 | 205 # build it if we are using a version of Vis Studio |
0 | 206 # older than .Net 2003. |
207 # SA_INCLUDE and SA_LIB are hold-overs from a previous | |
208 # implementation in which we could build SA using | |
209 # Debugging Tools For Windows, in which the .h/.lib files | |
210 # and the .dlls are in different places than | |
211 # they are for Vis Studio .Net 2003. | |
212 # If that code ever needs to be resurrected, these vars | |
213 # can be set here. They are used in makefiles/sa.make. | |
214 | |
215 checkSA:: | |
216 | |
217 !if "$(BUILD_WIN_SA)" != "1" | |
218 checkSA:: | |
219 @echo Not building SA: BUILD_WIN_SA != 1 | |
220 | |
221 !elseif "$(ARCH)" == "ia64" | |
222 BUILD_WIN_SA = 0 | |
223 checkSA:: | |
224 @echo Not building SA: ARCH = ia64 | |
225 | |
226 !endif # ! "$(BUILD_WIN_SA)" != "1" | |
227 | |
228 ######################################################################### | |
229 | |
230 defaultTarget: product | |
231 | |
232 # The product or release build is an optimized build, and is the default | |
233 | |
234 # note that since all the build targets depend on local.make that BUILDARCH | |
235 # and Platform_arch and Platform_arch_model will get set in local.make | |
236 # and there is no need to pass them thru here on the command line | |
237 # | |
238 product release optimized: checks $(variantDir) $(variantDir)\local.make sanity | |
239 cd $(variantDir) | |
91
a294fd0c4b38
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
0
diff
changeset
|
240 nmake -nologo -f $(WorkSpace)\make\windows\makefiles\top.make BUILD_FLAVOR=product ARCH=$(ARCH) |
0 | 241 |
242 # The debug or jvmg (all the same thing) is an optional build | |
243 debug jvmg: checks $(variantDir) $(variantDir)\local.make sanity | |
244 cd $(variantDir) | |
91
a294fd0c4b38
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
0
diff
changeset
|
245 nmake -nologo -f $(WorkSpace)\make\windows\makefiles\top.make BUILD_FLAVOR=debug ARCH=$(ARCH) |
0 | 246 fastdebug: checks $(variantDir) $(variantDir)\local.make sanity |
247 cd $(variantDir) | |
91
a294fd0c4b38
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
0
diff
changeset
|
248 nmake -nologo -f $(WorkSpace)\make\windows\makefiles\top.make BUILD_FLAVOR=fastdebug ARCH=$(ARCH) |
0 | 249 |
250 develop: checks $(variantDir) $(variantDir)\local.make sanity | |
251 cd $(variantDir) | |
91
a294fd0c4b38
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
0
diff
changeset
|
252 nmake -nologo -f $(WorkSpace)\make\windows\makefiles\top.make BUILD_FLAVOR=product DEVELOP=1 ARCH=$(ARCH) |
0 | 253 |
1322
21141e23627a
6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents:
456
diff
changeset
|
254 # target to create just the directory structure |
21141e23627a
6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents:
456
diff
changeset
|
255 tree: checks $(variantDir) $(variantDir)\local.make sanity |
21141e23627a
6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents:
456
diff
changeset
|
256 mkdir $(variantDir)\product |
21141e23627a
6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents:
456
diff
changeset
|
257 mkdir $(variantDir)\debug |
21141e23627a
6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents:
456
diff
changeset
|
258 mkdir $(variantDir)\fastdebug |
21141e23627a
6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents:
456
diff
changeset
|
259 |
0 | 260 sanity: |
261 @ echo; | |
262 @ cd $(variantDir) | |
91
a294fd0c4b38
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
0
diff
changeset
|
263 @ nmake -nologo -f $(WorkSpace)\make\windows\makefiles\sanity.make |
0 | 264 @ cd .. |
265 @ echo; | |
266 | |
267 clean: checkVariant | |
268 - rm -r -f $(variantDir) | |
269 | |
270 $(variantDir): | |
271 mkdir $(variantDir) | |
272 | |
273 $(variantDir)\local.make: checks | |
274 @ echo # Generated file > $@ | |
275 @ echo Variant=$(realVariant) >> $@ | |
276 @ echo WorkSpace=$(WorkSpace) >> $@ | |
277 @ echo BootStrapDir=$(BootStrapDir) >> $@ | |
3310 | 278 @ if "$(USERNAME)" NEQ "" echo BuildUser=$(USERNAME) >> $@ |
0 | 279 @ echo HS_VER=$(HS_VER) >> $@ |
280 @ echo HS_DOTVER=$(HS_DOTVER) >> $@ | |
281 @ echo HS_COMPANY=$(COMPANY_NAME) >> $@ | |
282 @ echo HS_FILEDESC=$(HS_FILEDESC) >> $@ | |
283 @ echo HOTSPOT_VM_DISTRO=$(HOTSPOT_VM_DISTRO) >> $@ | |
284 @ echo HS_COPYRIGHT=$(HOTSPOT_VM_COPYRIGHT) >> $@ | |
285 @ echo HS_NAME=$(PRODUCT_NAME) $(JDK_MKTG_VERSION) >> $@ | |
286 @ echo HS_BUILD_VER=$(HS_BUILD_VER) >> $@ | |
287 @ echo BUILD_WIN_SA=$(BUILD_WIN_SA) >> $@ | |
288 @ echo SA_BUILD_VERSION=$(HS_BUILD_VER) >> $@ | |
289 @ echo SA_INCLUDE=$(SA_INCLUDE) >> $@ | |
290 @ echo SA_LIB=$(SA_LIB) >> $@ | |
291 @ echo JDK_VER=$(JDK_VER) >> $@ | |
292 @ echo JDK_DOTVER=$(JDK_DOTVER) >> $@ | |
293 @ echo JRE_RELEASE_VER=$(JRE_RELEASE_VER) >> $@ | |
294 @ echo BUILDARCH=$(BUILDARCH) >> $@ | |
295 @ echo Platform_arch=$(Platform_arch) >> $@ | |
296 @ echo Platform_arch_model=$(Platform_arch_model) >> $@ | |
5897
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
3310
diff
changeset
|
297 @ echo CXX=$(CXX) >> $@ |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
3310
diff
changeset
|
298 @ echo LD=$(LD) >> $@ |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
3310
diff
changeset
|
299 @ echo MT=$(MT) >> $@ |
7292cff45988
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
3310
diff
changeset
|
300 @ echo RC=$(RC) >> $@ |
91
a294fd0c4b38
6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents:
0
diff
changeset
|
301 @ sh $(WorkSpace)/make/windows/get_msc_ver.sh >> $@ |
6020
d652a62d6e03
7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents:
3310
diff
changeset
|
302 @ if "$(ENABLE_FULL_DEBUG_SYMBOLS)" NEQ "" echo ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS) >> $@ |
d652a62d6e03
7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents:
3310
diff
changeset
|
303 @ if "$(ZIP_DEBUGINFO_FILES)" NEQ "" echo ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES) >> $@ |
d652a62d6e03
7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents:
3310
diff
changeset
|
304 @ if "$(RM)" NEQ "" echo RM=$(RM) >> $@ |
d652a62d6e03
7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents:
3310
diff
changeset
|
305 @ if "$(ZIPEXE)" NEQ "" echo ZIPEXE=$(ZIPEXE) >> $@ |
0 | 306 |
307 checks: checkVariant checkWorkSpace checkSA | |
308 | |
309 checkVariant: | |
4572
76841bdd5f3e
(Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents:
3310
diff
changeset
|
310 @ if "$(Variant)"=="" echo Need to specify "Variant=[graal|tiered|compiler2|compiler1|kernel|core]" && false |
76841bdd5f3e
(Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents:
3310
diff
changeset
|
311 @ if "$(Variant)" NEQ "graal" if "$(Variant)" NEQ "tiered" if "$(Variant)" NEQ "compiler2" if "$(Variant)" NEQ "compiler1" if "$(Variant)" NEQ "kernel" if "$(Variant)" NEQ "core" \ |
76841bdd5f3e
(Windows) Add Graal build configurations (with GRAAL defined) and fix build command.
Andreas Woess <andreas.woess@jku.at>
parents:
3310
diff
changeset
|
312 echo Need to specify "Variant=[graal|tiered|compiler2|compiler1|kernel|core]" && false |
0 | 313 |
314 checkWorkSpace: | |
315 @ if "$(WorkSpace)"=="" echo Need to specify "WorkSpace=..." && false | |
316 | |
317 checkBuildID: | |
318 @ if "$(BuildID)"=="" echo Need to specify "BuildID=..." && false |