< prev index next >

make/hotspot/lib/CompileJvm.gmk

Print this page

        

@@ -22,90 +22,27 @@
 # or visit www.oracle.com if you need additional information or have any
 # questions.
 #
 
 # Include support files that will setup compiler flags due to the selected
-# jvm feature set, and specific file overrides.
+# jvm feature set, specific file overrides, and general flags.
 include lib/JvmFeatures.gmk
 include lib/JvmOverrideFiles.gmk
+include lib/JvmFlags.gmk
 
-$(eval $(call IncludeCustomExtension, hotspot/lib/CompileJvm.gmk))
+# Include support files that will setup DTRACE_EXTRA_OBJECT_FILES.
+include lib/JvmDtraceObjects.gmk
 
 ################################################################################
 # Setup compilation of the main Hotspot native library (libjvm).
 
 JVM_OUTPUTDIR := $(JVM_VARIANT_OUTPUTDIR)/libjvm
 JVM_MAPFILE := $(JVM_OUTPUTDIR)/mapfile
 
 ################################################################################
 # Platform independent setup
 
-# This variable may be added to by a custom extension
-JVM_SRC_ROOTS += $(TOPDIR)/src/hotspot
-
-JVM_SRC_DIRS += $(call uniq, $(wildcard $(foreach d, $(JVM_SRC_ROOTS), \
-        $d/share \
-        $d/os/$(HOTSPOT_TARGET_OS) \
-        $d/os/$(HOTSPOT_TARGET_OS_TYPE) \
-        $d/cpu/$(HOTSPOT_TARGET_CPU_ARCH) \
-        $d/os_cpu/$(HOTSPOT_TARGET_OS)_$(HOTSPOT_TARGET_CPU_ARCH) \
-    ))) \
-    $(JVM_VARIANT_OUTPUTDIR)/gensrc/jvmtifiles \
-    $(JVM_VARIANT_OUTPUTDIR)/gensrc/tracefiles \
-    #
-
-JVM_CFLAGS_INCLUDES += \
-    $(patsubst %,-I%,$(filter-out $(JVM_VARIANT_OUTPUTDIR)/gensrc/%, $(JVM_SRC_DIRS))) \
-    -I$(JVM_VARIANT_OUTPUTDIR)/gensrc \
-    -I$(TOPDIR)/src/hotspot/share/precompiled \
-    -I$(TOPDIR)/src/hotspot/share/include \
-    -I$(TOPDIR)/src/hotspot/os/$(HOTSPOT_TARGET_OS_TYPE)/include \
-    -I$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
-    -I$(SUPPORT_OUTPUTDIR)/modules_include/java.base/$(OPENJDK_TARGET_OS_INCLUDE_SUBDIR) \
-    -I$(TOPDIR)/src/java.base/share/native/libjimage \
-    #
-
-# INCLUDE_SUFFIX_* is only meant for including the proper
-# platform files. Don't use it to guard code. Use the value of
-# HOTSPOT_TARGET_CPU_DEFINE etc. instead.
-# Remaining TARGET_ARCH_* is needed to select the cpu specific
-# sources for 64-bit ARM ports (arm versus aarch64).
-JVM_CFLAGS_TARGET_DEFINES += \
-    -DTARGET_ARCH_$(HOTSPOT_TARGET_CPU_ARCH) \
-    -DINCLUDE_SUFFIX_OS=_$(HOTSPOT_TARGET_OS) \
-    -DINCLUDE_SUFFIX_CPU=_$(HOTSPOT_TARGET_CPU_ARCH) \
-    -DINCLUDE_SUFFIX_COMPILER=_$(HOTSPOT_TOOLCHAIN_TYPE) \
-    -DTARGET_COMPILER_$(HOTSPOT_TOOLCHAIN_TYPE) \
-    -D$(HOTSPOT_TARGET_CPU_DEFINE) \
-    -DHOTSPOT_LIB_ARCH='"$(OPENJDK_TARGET_CPU_LEGACY_LIB)"' \
-    #
-
-ifeq ($(DEBUG_LEVEL), release)
-  # For hotspot, release builds differ internally between "optimized" and "product"
-  # in that "optimize" does not define PRODUCT.
-  ifneq ($(HOTSPOT_DEBUG_LEVEL), optimized)
-    JVM_CFLAGS_DEBUGLEVEL := -DPRODUCT
-  endif
-else ifeq ($(DEBUG_LEVEL), fastdebug)
-  JVM_CFLAGS_DEBUGLEVEL := -DASSERT
-  ifeq ($(filter $(OPENJDK_TARGET_OS), windows aix), )
-    # NOTE: Old build did not define CHECK_UNHANDLED_OOPS on Windows and AIX.
-    JVM_CFLAGS_DEBUGLEVEL += -DCHECK_UNHANDLED_OOPS
-  endif
-else ifeq ($(DEBUG_LEVEL), slowdebug)
-  # _NMT_NOINLINE_ informs NMT that no inlining is done by the compiler
-  JVM_CFLAGS_DEBUGLEVEL := -DASSERT -D_NMT_NOINLINE_
-endif
-
-JVM_CFLAGS += \
-    $(JVM_CFLAGS_DEBUGLEVEL) \
-    $(JVM_CFLAGS_TARGET_DEFINES) \
-    $(JVM_CFLAGS_FEATURES) \
-    $(JVM_CFLAGS_INCLUDES) \
-    $(EXTRA_CFLAGS) \
-    #
-
 JVM_LDFLAGS += \
     $(SHARED_LIBRARY_FLAGS) \
     $(JVM_LDFLAGS_FEATURES) \
     $(EXTRA_LDFLAGS) \
     #

@@ -140,15 +77,10 @@
     -DHOTSPOT_BUILD_USER='"$(USERNAME)"' \
     -DHOTSPOT_VM_DISTRO='"$(HOTSPOT_VM_DISTRO)"' \
     -DCPU='"$(OPENJDK_TARGET_CPU_VM_VERSION)"' \
     #
 
-# -DDONT_USE_PRECOMPILED_HEADER will exclude all includes in precompiled.hpp.
-ifeq ($(USE_PRECOMPILED_HEADER), false)
-  JVM_CFLAGS += -DDONT_USE_PRECOMPILED_HEADER
-endif
-
 ################################################################################
 # Platform specific setup
 
 # ARM source selection
 

@@ -212,11 +144,10 @@
 $(eval $(call SetupNativeCompilation, BUILD_LIBJVM, \
     NAME := jvm, \
     TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
     OUTPUT_DIR := $(JVM_LIB_OUTPUTDIR), \
     SRC := $(JVM_SRC_DIRS), \
-    EXTRA_FILES := $(DTRACE_EXTRA_SOURCE_FILES), \
     EXCLUDES := $(JVM_EXCLUDES), \
     EXCLUDE_FILES := $(JVM_EXCLUDE_FILES), \
     EXCLUDE_PATTERNS := $(JVM_EXCLUDE_PATTERNS), \
     EXTRA_OBJECT_FILES := $(DTRACE_EXTRA_OBJECT_FILES), \
     CFLAGS := $(JVM_CFLAGS), \
< prev index next >