< prev index next >

make/hotspot/gensrc/GensrcAdlc.gmk

Print this page

        

@@ -1,7 +1,7 @@
 #
-# Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2018, 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
 # under the terms of the GNU General Public License version 2 only, as
 # published by the Free Software Foundation.  Oracle designates this

@@ -32,20 +32,20 @@
   ##############################################################################
   # Build the ad compiler (the adlc build tool)
 
   # Flags depending on the build platform/tool chain
   # NOTE: No optimization or debug flags set here
-  ifeq ($(call isBuildOs, linux), true)
+  ifeq ($(OPENJDK_BUILD_OS), linux)
     ADLC_CFLAGS := -fno-exceptions -DLINUX
-  else ifeq ($(call isBuildOs, solaris), true)
+  else ifeq ($(OPENJDK_BUILD_OS), solaris)
     ADLC_LDFLAGS := -m64
     ADLC_CFLAGS := -m64
     ADLC_CFLAGS_WARNINGS := +w
-  else ifeq ($(call isBuildOs, aix), true)
+  else ifeq ($(OPENJDK_BUILD_OS), aix)
     ADLC_LDFLAGS := -q64
     ADLC_CFLAGS := -qnortti -qeh -q64 -DAIX
-  else ifeq ($(call isBuildOs, windows), true)
+  else ifeq ($(OPENJDK_BUILD_OS), windows)
     ADLC_LDFLAGS := -nologo
     ADLC_CFLAGS := -nologo -EHsc
     # NOTE: The old build also have -D_CRT_SECURE_NO_DEPRECATE but it doesn't
     # seem needed any more.
     ADLC_CFLAGS_WARNINGS := -W3 -D_CRT_SECURE_NO_WARNINGS

@@ -74,11 +74,10 @@
       OBJECT_DIR := $(JVM_VARIANT_OUTPUTDIR)/tools/adlc/objs, \
       OUTPUT_DIR := $(JVM_VARIANT_OUTPUTDIR)/tools/adlc, \
       DEBUG_SYMBOLS := false, \
       DISABLED_WARNINGS_clang := tautological-compare, \
       DISABLED_WARNINGS_solstudio := notemsource, \
-      DEFINE_THIS_FILE := false, \
   ))
 
   ADLC_TOOL := $(BUILD_ADLC_TARGET)
 
   ##############################################################################

@@ -86,21 +85,21 @@
 
   # Setup flags for the adlc build tool (ADLCFLAGS).
   ADLCFLAGS += -q -T
 
   # ADLC flags depending on target OS
-  ifeq ($(call isTargetOs, linux), true)
+  ifeq ($(OPENJDK_TARGET_OS), linux)
     ADLCFLAGS += -DLINUX=1 -D_GNU_SOURCE=1
-  else ifeq ($(call isTargetOs, solaris), true)
+  else ifeq ($(OPENJDK_TARGET_OS), solaris)
     ADLCFLAGS += -DSOLARIS=1 -DSPARC_WORKS=1
-  else ifeq ($(call isTargetOs, aix), true)
+  else ifeq ($(OPENJDK_TARGET_OS), aix)
     ADLCFLAGS += -DAIX=1
-  else ifeq ($(call isTargetOs, macosx), true)
+  else ifeq ($(OPENJDK_TARGET_OS), macosx)
     ADLCFLAGS += -D_ALLBSD_SOURCE=1 -D_GNU_SOURCE=1
   endif
 
-  ifeq ($(call isTargetOs, windows), false)
+  ifneq ($(OPENJDK_TARGET_OS), windows)
     # NOTE: Windows adlc flags was different in the old build. Is this really
     # correct?
 
     # -g makes #line directives in the generated C++ files.
     ADLCFLAGS += -g

@@ -108,11 +107,11 @@
     ADLCFLAGS += -D$(HOTSPOT_TARGET_CPU_DEFINE)=1
   endif
 
   # This generates checks in the generated C++ files that _LP64 is correctly
   # (un)defined when compiling them.
-  ifeq ($(call isTargetCpuBits, 64), true)
+  ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
     ADLCFLAGS += -D_LP64=1
   else
     ADLCFLAGS += -U_LP64
   endif
 

@@ -135,22 +134,10 @@
       $d/cpu/$(HOTSPOT_TARGET_CPU_ARCH)/$(HOTSPOT_TARGET_CPU).ad \
       $d/cpu/$(HOTSPOT_TARGET_CPU_ARCH)/$(HOTSPOT_TARGET_CPU_ARCH).ad \
       $d/os_cpu/$(HOTSPOT_TARGET_OS)_$(HOTSPOT_TARGET_CPU_ARCH)/$(HOTSPOT_TARGET_OS)_$(HOTSPOT_TARGET_CPU_ARCH).ad \
     )))
 
-  ifeq ($(call check-jvm-feature, shenandoahgc), true)
-    AD_SRC_FILES += $(call uniq, $(wildcard $(foreach d, $(AD_SRC_ROOTS), \
-        $d/cpu/$(HOTSPOT_TARGET_CPU_ARCH)/gc/shenandoah/shenandoah_$(HOTSPOT_TARGET_CPU).ad \
-      )))
-  endif
-
-  ifeq ($(call check-jvm-feature, zgc), true)
-    AD_SRC_FILES += $(call uniq, $(wildcard $(foreach d, $(AD_SRC_ROOTS), \
-        $d/cpu/$(HOTSPOT_TARGET_CPU_ARCH)/gc/z/z_$(HOTSPOT_TARGET_CPU).ad \
-      )))
-  endif
-
   SINGLE_AD_SRCFILE := $(ADLC_SUPPORT_DIR)/all-ad-src.ad
 
   INSERT_FILENAME_AWK_SCRIPT := \
       '{ \
          if (CUR_FN != FILENAME) { CUR_FN=FILENAME; NR_BASE=NR-1; need_lineno=1 } \

@@ -165,20 +152,22 @@
         $(NAWK) $(INSERT_FILENAME_AWK_SCRIPT) $^ > $@
 
   ##############################################################################
   # Run the adlc tool on the single concatenated ad source file, and store the
   # output in support/adlc for further processing.
-  $(eval $(call SetupExecute, adlc_run, \
-      INFO := Generating adlc files, \
-      DEPS := $(BUILD_ADLC) $(SINGLE_AD_SRCFILE), \
-      OUTPUT_DIR := $(ADLC_SUPPORT_DIR), \
-      COMMAND := $(FIXPATH) $(ADLC_TOOL) $(ADLCFLAGS) $(SINGLE_AD_SRCFILE) \
-          -c$(ADLC_SUPPORT_DIR)/ad_$(HOTSPOT_TARGET_CPU_ARCH).cpp \
-          -h$(ADLC_SUPPORT_DIR)/ad_$(HOTSPOT_TARGET_CPU_ARCH).hpp \
-          -a$(ADLC_SUPPORT_DIR)/dfa_$(HOTSPOT_TARGET_CPU_ARCH).cpp \
-          -v$(ADLC_SUPPORT_DIR)/adGlobals_$(HOTSPOT_TARGET_CPU_ARCH).hpp, \
-  ))
+  ADLC_RUN_MARKER := $(ADLC_SUPPORT_DIR)/_adlc_run.marker
+
+  $(ADLC_RUN_MARKER): $(BUILD_ADLC) $(SINGLE_AD_SRCFILE)
+        $(call LogInfo, Generating adlc files)
+        $(call MakeDir, $(@D))
+        $(call ExecuteWithLog, $(ADLC_SUPPORT_DIR)/adlc_run, \
+            $(FIXPATH) $(ADLC_TOOL) $(ADLCFLAGS) $(SINGLE_AD_SRCFILE) \
+                -c$(ADLC_SUPPORT_DIR)/ad_$(HOTSPOT_TARGET_CPU_ARCH).cpp \
+                -h$(ADLC_SUPPORT_DIR)/ad_$(HOTSPOT_TARGET_CPU_ARCH).hpp \
+                -a$(ADLC_SUPPORT_DIR)/dfa_$(HOTSPOT_TARGET_CPU_ARCH).cpp \
+                -v$(ADLC_SUPPORT_DIR)/adGlobals_$(HOTSPOT_TARGET_CPU_ARCH).hpp)
+        $(TOUCH) $@
 
   ##############################################################################
   # Finally copy the generated files from support/adlc into gensrc/adfiles,
   # and postprocess them by fixing dummy #line directives.
 

@@ -194,17 +183,17 @@
       ad_$(HOTSPOT_TARGET_CPU_ARCH)_pipeline.cpp \
       adGlobals_$(HOTSPOT_TARGET_CPU_ARCH).hpp \
       dfa_$(HOTSPOT_TARGET_CPU_ARCH).cpp \
   )
 
-  $(JVM_VARIANT_OUTPUTDIR)/gensrc/adfiles/%: $(adlc_run_TARGET)
+  $(JVM_VARIANT_OUTPUTDIR)/gensrc/adfiles/%: $(ADLC_RUN_MARKER)
         $(call LogInfo, Postprocessing adlc file $*)
         $(call MakeDir, $(@D))
         $(NAWK) \
             'BEGIN { print "#line 1 \"$*\""; } \
              /^#line 999999$$/ {print "#line " (NR+1) " \"$*\""; next} \
              {print}' \
             < $(ADLC_SUPPORT_DIR)/$* > $@
 
-  TARGETS += $(ADLC_GENERATED_FILES)
+  TARGETS := $(ADLC_GENERATED_FILES)
 
 endif
< prev index next >