Path: blob/aarch64-shenandoah-jdk8u272-b10/hotspot/make/windows/build.make
32285 views
#1# Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.2# Copyright 2019 Red Hat, Inc.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 it6# under the terms of the GNU General Public License version 2 only, as7# published by the Free Software Foundation.8#9# This code is distributed in the hope that it will be useful, but WITHOUT10# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or11# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License12# version 2 for more details (a copy is included in the LICENSE file that13# accompanied this code).14#15# You should have received a copy of the GNU General Public License version16# 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#19# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA20# or visit www.oracle.com if you need additional information or have any21# questions.22#23#2425# Note: this makefile is invoked both from build.bat and from the J2SE26# control workspace in exactly the same manner; the required27# environment variables (Variant, WorkSpace, BootStrapDir, BuildUser, HOTSPOT_BUILD_VERSION)28# are passed in as command line arguments.2930# Note: Running nmake or build.bat from the Windows command shell requires31# that "sh" be accessible on the PATH. An MKS install does this.3233# 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.dll36# 2. sawindbg.dll - Native library for SA - This is built after jvm.dll37# - Also, .lib, .map, .pdb.38#39# Please refer to ./makefiles/sa.make4041# If we haven't set an ARCH yet use x8642# create.bat and build.bat will set it, if used.43!ifndef ARCH44ARCH=x8645!endif464748# Must be one of these values (if value comes in from env, can't trust it)49!if "$(ARCH)" != "x86"50!if "$(ARCH)" != "ia64"51ARCH=x8652!endif53!endif5455# At this point we should be certain that ARCH has a definition56# now determine the BUILDARCH57#5859# the default BUILDARCH60BUILDARCH=i4866162# Allow control workspace to force Itanium or AMD64 builds with LP6463ARCH_TEXT=64!ifdef LP6465!if "$(LP64)" == "1"66ARCH_TEXT=64-Bit67!if "$(ARCH)" == "x86"68BUILDARCH=amd6469!else70BUILDARCH=ia6471!endif72!endif73!endif7475!if "$(BUILDARCH)" != "ia64"76!ifndef CC_INTERP77!ifndef FORCE_TIERED78FORCE_TIERED=179!endif80!endif81!endif8283!if "$(BUILDARCH)" == "amd64"84Platform_arch=x8685Platform_arch_model=x86_6486!endif87!if "$(BUILDARCH)" == "i486"88Platform_arch=x8689Platform_arch_model=x86_3290!endif9192# Supply these from the command line or the environment93# It doesn't make sense to default this one94Variant=95# It doesn't make sense to default this one96WorkSpace=9798variantDir = windows_$(BUILDARCH)_$(Variant)99100realVariant=$(Variant)101VARIANT_TEXT=Core102!if "$(Variant)" == "compiler1"103VARIANT_TEXT=Client104!elseif "$(Variant)" == "compiler2"105!if "$(FORCE_TIERED)" == "1"106VARIANT_TEXT=Server107realVariant=tiered108!else109VARIANT_TEXT=Server110!endif111!elseif "$(Variant)" == "tiered"112VARIANT_TEXT=Tiered113!endif114115#########################################################################116# Parameters for VERSIONINFO resource for jvm.dll.117# These can be overridden via the nmake.exe command line.118# They are overridden by RE during the control builds.119#120!include "$(WorkSpace)/make/hotspot_version"121122# Define HOTSPOT_VM_DISTRO based on settings in make/openjdk_distro123# or make/hotspot_distro.124!ifndef HOTSPOT_VM_DISTRO125!if exists($(WorkSpace)\src\closed)126127# if the build is for JDK6 or earlier version, it should include jdk6_hotspot_distro,128# instead of hotspot_distro.129JDK6_OR_EARLIER=0130!if "$(JDK_MAJOR_VERSION)" != "" && "$(JDK_MINOR_VERSION)" != "" && "$(JDK_MICRO_VERSION)" != ""131!if $(JDK_MAJOR_VERSION) == 1 && $(JDK_MINOR_VERSION) < 7132JDK6_OR_EARLIER=1133!endif134!else135!if $(JDK_MAJOR_VER) == 1 && $(JDK_MINOR_VER) < 7136JDK6_OR_EARLIER=1137!endif138!endif139140!if $(JDK6_OR_EARLIER) == 1141!include $(WorkSpace)\make\jdk6_hotspot_distro142!else143!include $(WorkSpace)\make\hotspot_distro144!endif145!else146!include $(WorkSpace)\make\openjdk_distro147!endif148!endif149150# Following the Web Start / Plugin model here....151# We can have update versions like "01a", but Windows requires152# we use only integers in the file version field. So:153# JDK_UPDATE_VER = JDK_UPDATE_VERSION * 10 + EXCEPTION_VERSION154#155JDK_UPDATE_VER=0156JDK_BUILD_NUMBER=0157158HS_FILEDESC=$(HOTSPOT_VM_DISTRO) $(ARCH_TEXT) $(VARIANT_TEXT) VM159160# JDK ProductVersion:161# 1.5.0_<wx>-b<yz> will have DLL version 5.0.wx*10.yz162# Thus, 1.5.0_10-b04 will be 5.0.100.4163# 1.6.0-b01 will be 6.0.0.1164# 1.6.0_01a-b02 will be 6.0.11.2165#166# JDK_* variables are defined in make/hotspot_version or on command line167#168JDK_VER=$(JDK_MINOR_VER),$(JDK_MICRO_VER),$(JDK_UPDATE_VER),$(JDK_BUILD_NUMBER)169JDK_DOTVER=$(JDK_MINOR_VER).$(JDK_MICRO_VER).$(JDK_UPDATE_VER).$(JDK_BUILD_NUMBER)170!if "$(JRE_RELEASE_VERSION)" == ""171JRE_RELEASE_VER=$(JDK_MAJOR_VER).$(JDK_MINOR_VER).$(JDK_MICRO_VER)172!else173JRE_RELEASE_VER=$(JRE_RELEASE_VERSION)174!endif175!if "$(JDK_MKTG_VERSION)" == ""176JDK_MKTG_VERSION=$(JDK_MINOR_VER).$(JDK_MICRO_VER)177!endif178179# Hotspot Express VM FileVersion:180# 10.0-b<yz> will have DLL version 10.0.0.yz (need 4 numbers).181#182# HS_* variables are defined in make/hotspot_version183#184HS_VER=$(HS_MAJOR_VER),$(HS_MINOR_VER),0,$(HS_BUILD_NUMBER)185HS_DOTVER=$(HS_MAJOR_VER).$(HS_MINOR_VER).0.$(HS_BUILD_NUMBER)186187!if "$(HOTSPOT_RELEASE_VERSION)" == ""188HOTSPOT_RELEASE_VERSION=$(HS_MAJOR_VER).$(HS_MINOR_VER)-b$(HS_BUILD_NUMBER)189!endif190191!if "$(HOTSPOT_BUILD_VERSION)" == ""192HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION)193!else194HS_BUILD_VER=$(HOTSPOT_RELEASE_VERSION)-$(HOTSPOT_BUILD_VERSION)195!endif196197# End VERSIONINFO parameters198199# if hotspot-only build and/or OPENJDK isn't passed down, need to set OPENJDK200!ifndef OPENJDK201!if !exists($(WorkSpace)\src\closed)202OPENJDK=true203!endif204!endif205206# We don't support SA on ia64, and we can't207# build it if we are using a version of Vis Studio208# older than .Net 2003.209# SA_INCLUDE and SA_LIB are hold-overs from a previous210# implementation in which we could build SA using211# Debugging Tools For Windows, in which the .h/.lib files212# and the .dlls are in different places than213# they are for Vis Studio .Net 2003.214# If that code ever needs to be resurrected, these vars215# can be set here. They are used in makefiles/sa.make.216217checkSA::218219!if "$(BUILD_WIN_SA)" != "1"220checkSA::221@echo Not building SA: BUILD_WIN_SA != 1222223!elseif "$(ARCH)" == "ia64"224BUILD_WIN_SA = 0225checkSA::226@echo Not building SA: ARCH = ia64227228!endif # ! "$(BUILD_WIN_SA)" != "1"229230#########################################################################231232defaultTarget: product233234# The product or release build is an optimized build, and is the default235236# note that since all the build targets depend on local.make that BUILDARCH237# and Platform_arch and Platform_arch_model will get set in local.make238# and there is no need to pass them thru here on the command line239#240product release optimized: checks $(variantDir) $(variantDir)\local.make sanity241cd $(variantDir)242nmake -nologo -f $(WorkSpace)\make\windows\makefiles\top.make BUILD_FLAVOR=product ARCH=$(ARCH)243244# The debug build is an optional build245debug: checks $(variantDir) $(variantDir)\local.make sanity246cd $(variantDir)247nmake -nologo -f $(WorkSpace)\make\windows\makefiles\top.make BUILD_FLAVOR=debug ARCH=$(ARCH)248fastdebug: checks $(variantDir) $(variantDir)\local.make sanity249cd $(variantDir)250nmake -nologo -f $(WorkSpace)\make\windows\makefiles\top.make BUILD_FLAVOR=fastdebug ARCH=$(ARCH)251252# target to create just the directory structure253tree: checks $(variantDir) $(variantDir)\local.make sanity254mkdir $(variantDir)\product255mkdir $(variantDir)\debug256mkdir $(variantDir)\fastdebug257258sanity:259@ echo;260@ cd $(variantDir)261@ nmake -nologo -f $(WorkSpace)\make\windows\makefiles\sanity.make262@ cd ..263@ echo;264265clean: checkVariant266- rm -r -f $(variantDir)267268$(variantDir):269mkdir $(variantDir)270271$(variantDir)\local.make: checks272@ echo # Generated file > $@273@ echo Variant=$(realVariant) >> $@274@ echo WorkSpace=$(WorkSpace) >> $@275@ echo BootStrapDir=$(BootStrapDir) >> $@276@ if "$(USERNAME)" NEQ "" echo BuildUser=$(USERNAME) >> $@277@ echo HS_VER=$(HS_VER) >> $@278@ echo HS_DOTVER=$(HS_DOTVER) >> $@279@ echo HS_COMPANY=$(COMPANY_NAME) >> $@280@ echo HS_FILEDESC=$(HS_FILEDESC) >> $@281@ echo HOTSPOT_VM_DISTRO=$(HOTSPOT_VM_DISTRO) >> $@282@ echo VENDOR=$(COMPANY_NAME) >> $@283@ echo VENDOR_URL=$(VENDOR_URL) >> $@284@ echo VENDOR_URL_BUG=$(VENDOR_URL_BUG) >> $@285@ echo VENDOR_URL_VM_BUG=$(VENDOR_URL_VM_BUG) >> $@286@ if "$(OPENJDK)" NEQ "" echo OPENJDK=$(OPENJDK) >> $@287@ echo HS_COPYRIGHT=$(HOTSPOT_VM_COPYRIGHT) >> $@288@ echo HS_NAME=$(PRODUCT_NAME) $(JDK_MKTG_VERSION) >> $@289@ echo HS_BUILD_VER=$(HS_BUILD_VER) >> $@290@ echo BUILD_WIN_SA=$(BUILD_WIN_SA) >> $@291@ echo SA_BUILD_VERSION=$(HS_BUILD_VER) >> $@292@ echo SA_INCLUDE=$(SA_INCLUDE) >> $@293@ echo SA_LIB=$(SA_LIB) >> $@294@ echo JDK_VER=$(JDK_VER) >> $@295@ echo JDK_DOTVER=$(JDK_DOTVER) >> $@296@ echo JRE_RELEASE_VER=$(JRE_RELEASE_VER) >> $@297@ echo BUILDARCH=$(BUILDARCH) >> $@298@ echo Platform_arch=$(Platform_arch) >> $@299@ echo Platform_arch_model=$(Platform_arch_model) >> $@300@ echo CXX=$(CXX) >> $@301@ echo LD=$(LD) >> $@302@ echo MT=$(MT) >> $@303@ echo RC=$(RC) >> $@304@ echo ENABLE_JFR=$(ENABLE_JFR) >> $@305@ sh $(WorkSpace)/make/windows/get_msc_ver.sh >> $@306@ if "$(ENABLE_FULL_DEBUG_SYMBOLS)" NEQ "" echo ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS) >> $@307@ if "$(ZIP_DEBUGINFO_FILES)" NEQ "" echo ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES) >> $@308@ if "$(RM)" NEQ "" echo RM=$(RM) >> $@309@ if "$(ZIPEXE)" NEQ "" echo ZIPEXE=$(ZIPEXE) >> $@310311checks: checkVariant checkWorkSpace checkSA312313checkVariant:314@ if "$(Variant)"=="" echo Need to specify "Variant=[tiered|compiler2|compiler1|core]" && false315@ if "$(Variant)" NEQ "tiered" if "$(Variant)" NEQ "compiler2" if "$(Variant)" NEQ "compiler1" if "$(Variant)" NEQ "core" \316echo Need to specify "Variant=[tiered|compiler2|compiler1|core]" && false317318checkWorkSpace:319@ if "$(WorkSpace)"=="" echo Need to specify "WorkSpace=..." && false320321checkBuildID:322@ if "$(BuildID)"=="" echo Need to specify "BuildID=..." && false323324325