mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-16 13:25:34 +00:00
7027897: Build support for client-VM only configurations
Support builds for which only the client VM is required and/or available Reviewed-by: ohair, andrew
This commit is contained in:
parent
4b0829340e
commit
87f8cc390f
@ -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 @@ endif
|
||||
|
||||
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
|
||||
#
|
||||
|
||||
@ -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 @@ include $(JDK_MAKE_SHARED_DIR)/Sanity-Settings.gmk
|
||||
sane-ant_version \
|
||||
sane-zip_version \
|
||||
sane-unzip_version \
|
||||
sane-msvcrt_path \
|
||||
sane-msvcrt_path \
|
||||
sane-freetype \
|
||||
sane-build_modules
|
||||
|
||||
@ -280,6 +280,12 @@ sane-arch_data_model:
|
||||
" $(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 @@ ifeq ($(PLATFORM), windows)
|
||||
" 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 \
|
||||
|
||||
@ -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 @@ $(INCLUDEDIR)/%.h: $(SHARE_SRC)/javavm/export/%.h
|
||||
$(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 @@ else
|
||||
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
|
||||
|
||||
|
||||
@ -77,8 +77,12 @@ all:: build
|
||||
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 @@ $(BINDIR)/$(MSVCRNN_DLL): $(MSVCRNN_DLL_PATH)/$(MSVCRNN_DLL)
|
||||
$(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 @@ $(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVMMAP_NAME):
|
||||
-$(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 @@ $(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVMPDB_NAME):
|
||||
-$(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 @@ else
|
||||
$(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 @@ $(LIB_LOCATION)/$(LIBJSIG_NAME): $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJ
|
||||
$(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 @@ $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDB_NAME): $(HOTSPOT_CLIENT_PATH)/64/$
|
||||
$(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)/$(JVMDB_NAME): $(HOTSPOT_SERVER_PATH)/$(JVMDB
|
||||
$(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 @@ $(LIB_LOCATION)/$(CLIENT_LOCATION)/64/$(JVMDTRACE_NAME): $(HOTSPOT_CLIENT_PATH)/
|
||||
$(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)/$(JVM_NAME): $(HOTSPOT_SERVER_PATH)/$(JVM_NAM
|
||||
|
||||
$(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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user