changeset 9096:147dfbe6ffa1

8233995: java.vm.vendor (and potentially other properties/fields) not correctly set in Windows/Hotspot build of OpenJDK8 Reviewed-by: andrew
author clanger
date Sat, 25 Jan 2020 06:34:42 +0000
parents a67e9c6edcdd
children a9ee6b70a32e
files make/windows/build.make make/windows/makefiles/compile.make make/windows/makefiles/defs.make make/windows/makefiles/vm.make
diffstat 4 files changed, 19 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/make/windows/build.make	Fri Jan 24 09:41:30 2020 +0800
+++ b/make/windows/build.make	Sat Jan 25 06:34:42 2020 +0000
@@ -280,7 +280,7 @@
 	@ echo HS_COMPANY=$(COMPANY_NAME)			>> $@
 	@ echo HS_FILEDESC=$(HS_FILEDESC)			>> $@
 	@ echo HOTSPOT_VM_DISTRO=$(HOTSPOT_VM_DISTRO)		>> $@
-	@ echo VENDOR=$(VENDOR)					>> $@
+	@ echo VENDOR=$(COMPANY_NAME)				>> $@
 	@ echo VENDOR_URL=$(VENDOR_URL)				>> $@
 	@ echo VENDOR_URL_BUG=$(VENDOR_URL_BUG)			>> $@
 	@ echo VENDOR_URL_VM_BUG=$(VENDOR_URL_VM_BUG)		>> $@
--- a/make/windows/makefiles/compile.make	Fri Jan 24 09:41:30 2020 +0800
+++ b/make/windows/makefiles/compile.make	Sat Jan 25 06:34:42 2020 +0000
@@ -346,7 +346,7 @@
 	 /D "HS_BUILD_ID=$(HS_BUILD_ID)" \
 	 /D "JDK_VER=$(JDK_VER)" \
 	 /D "JDK_DOTVER=$(JDK_DOTVER)" \
-	 /D "HS_COMPANY=$(HS_COMPANY)" \
+	 /D "HS_COMPANY=$(COMPANY_NAME)" \
 	 /D "HS_FILEDESC=$(HS_FILEDESC)" \
 	 /D "HS_COPYRIGHT=$(HS_COPYRIGHT)" \
 	 /D "HS_FNAME=$(HS_FNAME)" \
--- a/make/windows/makefiles/defs.make	Fri Jan 24 09:41:30 2020 +0800
+++ b/make/windows/makefiles/defs.make	Sat Jan 25 06:34:42 2020 +0000
@@ -157,6 +157,15 @@
 MAKE_ARGS += RM="$(RM)"
 MAKE_ARGS += ZIPEXE=$(ZIPEXE)
 
+MAKE_ARGS += COMPANY_NAME="$(COMPANY_NAME)"
+MAKE_ARGS += VENDOR_URL=$(VENDOR_URL)
+MAKE_ARGS += VENDOR_URL_BUG=$(VENDOR_URL_BUG)
+MAKE_ARGS += VENDOR_URL_VM_BUG=$(VENDOR_URL_VM_BUG)
+ifneq ($(VERSION_CFLAGS),)
+  # transform syntax from -DProp='"Value"' to /D "Prop=\"Value\"" for Windows build
+  MAKE_ARGS += VERSION_CFLAGS="$(subst -D,/D \",$(subst ',,$(subst '$() $(),\"$() $(),$(subst ",\\\",$(VERSION_CFLAGS)))))\""
+endif
+
 # On 32 bit windows we build server and client, on 64 bit just server.
 ifeq ($(JVM_VARIANTS),)
   ifeq ($(ARCH_DATA_MODEL), 32)
--- a/make/windows/makefiles/vm.make	Fri Jan 24 09:41:30 2020 +0800
+++ b/make/windows/makefiles/vm.make	Sat Jan 25 06:34:42 2020 +0000
@@ -62,10 +62,6 @@
 CXX_FLAGS=$(CXX_FLAGS) /D "HOTSPOT_BUILD_TARGET=\"$(BUILD_FLAVOR)\""
 CXX_FLAGS=$(CXX_FLAGS) /D "HOTSPOT_BUILD_USER=\"$(BuildUser)\""
 CXX_FLAGS=$(CXX_FLAGS) /D "HOTSPOT_VM_DISTRO=\"$(HOTSPOT_VM_DISTRO)\""
-CXX_FLAGS=$(CXX_FLAGS) /D "VENDOR=\"$(COMPANY_NAME)\""
-CXX_FLAGS=$(CXX_FLAGS) /D "VENDOR_URL=\"$(VENDOR_URL)\""
-CXX_FLAGS=$(CXX_FLAGS) /D "VENDOR_URL_BUG=\"$(VENDOR_URL_BUG)\""
-CXX_FLAGS=$(CXX_FLAGS) /D "VENDOR_URL_VM_BUG=\"$(VENDOR_URL_VM_BUG)\""
 
 CXX_FLAGS=$(CXX_FLAGS) $(CXX_INCLUDE_DIRS)
 
@@ -209,6 +205,14 @@
 bytecodeInterpreterWithChecks.obj: ..\generated\jvmtifiles\bytecodeInterpreterWithChecks.cpp
         $(CXX) $(CXX_FLAGS) $(CXX_DONT_USE_PCH) /c ..\generated\jvmtifiles\bytecodeInterpreterWithChecks.cpp
 
+#files compiled with version flags
+
+vm_version.obj: $(WorkSpace)\src\share\vm\runtime\vm_version.cpp
+        $(CXX) $(CXX_FLAGS) $(VERSION_CFLAGS) $(CXX_USE_PCH) /c $(WorkSpace)\src\share\vm\runtime\vm_version.cpp
+
+arguments.obj: $(WorkSpace)\src\share\vm\runtime\arguments.cpp
+        $(CXX) $(CXX_FLAGS) $(VERSION_CFLAGS) $(CXX_USE_PCH) /c $(WorkSpace)\src\share\vm\runtime\arguments.cpp
+
 # Default rules for the Virtual Machine
 {$(COMMONSRC)\share\vm\c1}.cpp.obj::
         $(CXX) $(CXX_FLAGS) $(CXX_USE_PCH) /c $<