make/windows/build.make

Mon, 28 Jul 2014 15:06:38 -0700

author
fzhinkin
date
Mon, 28 Jul 2014 15:06:38 -0700
changeset 6997
dbb05f6d93c4
parent 5237
f2110083203d
child 6876
710a3c8b516e
child 9634
d1520f0c3524
permissions
-rw-r--r--

8051344: JVM crashed in Compile::start() during method parsing w/ UseRTMDeopt turned on
Summary: call rtm_deopt() only if there were no compilation bailouts before.
Reviewed-by: kvn

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

mercurial