# HG changeset patch # User dholmes # Date 1300233162 14400 # Node ID cd1dceb2d6656c9a9b1e4098047eb2d6c4e7c57d # Parent b98f18278dc4ea1ab6cc75d8bb21a2a199a5b010 7027897: Build support for client-VM only configurations Summary: Support builds for which only the client VM is required and/or available Reviewed-by: ohair, andrew diff -r b98f18278dc4 -r cd1dceb2d665 jdk/make/common/Defs.gmk --- a/jdk/make/common/Defs.gmk Tue Mar 15 13:15:31 2011 +0000 +++ b/jdk/make/common/Defs.gmk Tue Mar 15 19:52:42 2011 -0400 @@ -1,5 +1,5 @@ # -# Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -115,6 +115,11 @@ include $(JDK_TOPDIR)/make/common/Defs-$(PLATFORM).gmk +# Reset the VM name for client-only builds +ifdef BUILD_CLIENT_ONLY + VM_NAME = client +endif + # # Freetype logic is applicable to OpenJDK only # diff -r b98f18278dc4 -r cd1dceb2d665 jdk/make/common/shared/Sanity.gmk --- a/jdk/make/common/shared/Sanity.gmk Tue Mar 15 13:15:31 2011 +0000 +++ b/jdk/make/common/shared/Sanity.gmk Tue Mar 15 19:52:42 2011 -0400 @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -220,7 +220,7 @@ sane-ant_version \ sane-zip_version \ sane-unzip_version \ - sane-msvcrt_path \ + sane-msvcrt_path \ sane-freetype \ sane-build_modules @@ -280,6 +280,12 @@ " $(YOU_ARE_USING) ARCH_DATA_MODEL=$(ARCH_DATA_MODEL). \n" \ "" >> $(ERROR_FILE) ; \ fi +ifdef BUILD_CLIENT_ONLY + @if [ "$(ARCH_DATA_MODEL)" != 32 ]; then \ + $(ECHO) "WARNING: You have requested BUILD_CLIENT_ONLY in a 64-bit build.\n" \ + "" >> $(WARNING_FILE) ; \ + fi +endif ###################################################### # Check the OS version (windows and linux have release name checks) @@ -1327,7 +1333,7 @@ " Microsoft DirectX 9 SDK can be downloaded from the following location:\n" \ " http://msdn.microsoft.com/library/default.asp?url=/downloads/list/directx.asp\n" \ " Or http://www.microsoft.com/directx\n" \ - "" >> $(WARNING_FILE) ; \ + "" >> $(WARNING_FILE) ; \ fi \ fi \ fi \ diff -r b98f18278dc4 -r cd1dceb2d665 jdk/make/java/jvm/Makefile --- a/jdk/make/java/jvm/Makefile Tue Mar 15 13:15:31 2011 +0000 +++ b/jdk/make/java/jvm/Makefile Tue Mar 15 19:52:42 2011 -0400 @@ -1,5 +1,5 @@ # -# Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -44,7 +44,8 @@ $(PLATFORM_INCLUDE)/%.h: $(PLATFORM_SRC)/javavm/export/%.h $(install-non-module-file) -JVMCFG = $(LIBDIR)/$(LIBARCH)/jvm.cfg +JVMCFG_DIR = $(LIBDIR)/$(LIBARCH) +JVMCFG = $(JVMCFG_DIR)/jvm.cfg # # How to install jvm.cfg. @@ -55,8 +56,21 @@ JVMCFG_ARCH = $(ARCH) endif +ifdef BUILD_CLIENT_ONLY +$(JVMCFG):: + $(MKDIR) -p $(JVMCFG_DIR) + @# Update jvm.cfg to use -client by default and alias -server to -client + $(RM) -f $(JVMCFG) + $(ECHO) "-client KNOWN">$(JVMCFG) + $(ECHO) "-server ALIASED_TO -client">>$(JVMCFG) + $(ECHO) "-hotspot ALIASED_TO -client">>$(JVMCFG) + $(ECHO) "-classic WARN">>$(JVMCFG) + $(ECHO) "-native ERROR">>$(JVMCFG) + $(ECHO) "-green ERROR">>$(JVMCFG) +else $(JVMCFG): $(PLATFORM_SRC)/bin/$(JVMCFG_ARCH)/jvm.cfg $(install-file) +endif all: build diff -r b98f18278dc4 -r cd1dceb2d665 jdk/make/java/redist/Makefile --- a/jdk/make/java/redist/Makefile Tue Mar 15 13:15:31 2011 +0000 +++ b/jdk/make/java/redist/Makefile Tue Mar 15 19:52:42 2011 -0400 @@ -77,8 +77,12 @@ INTERNAL_IMPORT_LIST = $(LIBDIR)/classlist # List of files coming from outside this workspace -IMPORT_LIST = $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_NAME) \ - $(LIB_LOCATION)/$(SERVER_LOCATION)/Xusage.txt +ifndef BUILD_CLIENT_ONLY + IMPORT_LIST = $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVM_NAME) \ + $(LIB_LOCATION)/$(SERVER_LOCATION)/Xusage.txt +else + IMPORT_LIST = +endif # Hotspot client is only available on 32-bit non-Zero builds ifneq ($(ZERO_BUILD), true) @@ -98,10 +102,12 @@ $(call chmod-file, a+x) # Get the hotspot .map and .pdb files for client and server +ifndef BUILD_CLIENT_ONLY IMPORT_LIST += \ $(LIBDIR)/$(JVMLIB_NAME) \ $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMMAP_NAME) \ $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMPDB_NAME) +endif # Add .map and .pdb files to the import path for client and kernel VMs. # These are only available on 32-bit windows builds. @@ -129,10 +135,12 @@ -$(CP) $(HOTSPOT_KERNEL_PATH)/$(JVMMAP_NAME) $@ @$(install-module-file) +ifndef BUILD_CLIENT_ONLY $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMMAP_NAME): @$(prep-target) -$(CP) $(HOTSPOT_SERVER_PATH)/$(JVMMAP_NAME) $@ @$(install-module-file) +endif $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMPDB_NAME): @$(prep-target) @@ -144,28 +152,33 @@ -$(CP) $(HOTSPOT_KERNEL_PATH)/$(JVMPDB_NAME) $@ @$(install-module-file) +ifndef BUILD_CLIENT_ONLY $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMPDB_NAME): @$(prep-target) -$(CP) $(HOTSPOT_SERVER_PATH)/$(JVMPDB_NAME) $@ @$(install-module-file) +endif # Windows ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Windows else # PLATFORM # NOT Windows vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv NOT Windows -IMPORT_LIST += \ - $(LIB_LOCATION)/$(LIBJSIG_NAME) \ - $(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_NAME) +IMPORT_LIST += $(LIB_LOCATION)/$(LIBJSIG_NAME) +ifndef BUILD_CLIENT_ONLY + IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_NAME) +endif ifeq ($(PLATFORM), solaris) - IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_NAME) -# The conditional can be removed when import JDKs contain these files. -ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_NAME)),) - IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_NAME) -else - $(warning WARNING: $(HOTSPOT_SERVER_PATH)/$(JVMDB_NAME) not found!) -endif -endif + ifndef BUILD_CLIENT_ONLY + IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_NAME) + # The conditional can be removed when import JDKs contain these files. + ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_NAME)),) + IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_NAME) + else + $(warning WARNING: $(HOTSPOT_SERVER_PATH)/$(JVMDB_NAME) not found!) + endif + endif +endif ifneq ($(ZERO_BUILD), true) ifeq ($(ARCH_DATA_MODEL), 32) @@ -186,18 +199,20 @@ $(warning WARNING: $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_NAME) not found!) endif -# The conditional can be removed when import JDKs contain these files. -ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_NAME)),) - IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_NAME) -else - $(warning WARNING: $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_NAME) not found!) -endif +ifndef BUILD_CLIENT_ONLY + # The conditional can be removed when import JDKs contain these files. + ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_NAME)),) + IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_NAME) + else + $(warning WARNING: $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_NAME) not found!) + endif -# The conditional can be removed when import JDKs contain these files. -ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_NAME)),) - IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDTRACE_NAME) -else - $(warning WARNING: $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_NAME) not found!) + # The conditional can be removed when import JDKs contain these files. + ifneq ($(wildcard $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_NAME)),) + IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDTRACE_NAME) + else + $(warning WARNING: $(HOTSPOT_SERVER_PATH)/64/$(JVMDTRACE_NAME) not found!) + endif endif # For backwards compatability, make a link of the 32-bit client JVM to $(LIBDIR) @@ -229,10 +244,16 @@ $(install-import-file) @$(call binary_file_verification,$@) +ifndef BUILD_CLIENT_ONLY $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_NAME) \ $(LIB_LOCATION)/$(SERVER_LOCATION)/$(LIBJSIG_NAME): @$(prep-target) $(call install-sym-link, ../$(LIBJSIG_NAME)) +else +$(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_NAME): + @$(prep-target) + $(call install-sym-link, ../$(LIBJSIG_NAME)) +endif $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDB_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDB_NAME) $(install-import-file) @@ -242,6 +263,7 @@ $(install-import-file) @$(call binary_file_verification,$@) +ifndef BUILD_CLIENT_ONLY $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDB_NAME) $(install-import-file) @$(call binary_file_verification,$@) @@ -249,6 +271,7 @@ $(LIB_LOCATION)/$(SERVER_LOCATION)/64/$(JVMDB_NAME): $(HOTSPOT_SERVER_PATH)/64/$(JVMDB_NAME) $(install-import-file) @$(call binary_file_verification,$@) +endif $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMDTRACE_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVMDTRACE_NAME) $(install-import-file) @@ -258,6 +281,7 @@ $(install-import-file) @$(call binary_file_verification,$@) +ifndef BUILD_CLIENT_ONLY $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDTRACE_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDTRACE_NAME) $(install-import-file) @$(call binary_file_verification,$@) @@ -272,6 +296,7 @@ $(LIB_LOCATION)/$(SERVER_LOCATION)/Xusage.txt : $(HOTSPOT_SERVER_PATH)/Xusage.txt $(install-import-file) +endif $(LIB_LOCATION)/$(CLIENT_LOCATION)/Xusage.txt : $(HOTSPOT_CLIENT_PATH)/Xusage.txt $(install-import-file)