20 #
21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 # or visit www.oracle.com if you need additional information or have any
23 # questions.
24 #
25
26 $(eval $(call IncludeCustomExtension, hotspot/gensrc/GensrcAdlc.gmk))
27
28 ifeq ($(call check-jvm-feature, compiler2), true)
29
30 ADLC_SUPPORT_DIR := $(JVM_SUPPORT_DIR)/adlc
31
32 ##############################################################################
33 # Build the ad compiler (the adlc build tool)
34
35 # Flags depending on the build platform/tool chain
36 # NOTE: No optimization or debug flags set here
37 ifeq ($(call isBuildOs, linux), true)
38 ADLC_CFLAGS := -fno-exceptions -DLINUX
39 else ifeq ($(call isBuildOs, aix), true)
40 ADLC_LDFLAGS := -q64
41 ADLC_CFLAGS := -qnortti -qeh -q64 -DAIX
42 else ifeq ($(call isBuildOs, windows), true)
43 ADLC_LDFLAGS := -nologo
44 ADLC_CFLAGS := -nologo -EHsc
45 # NOTE: The old build also have -D_CRT_SECURE_NO_DEPRECATE but it doesn't
46 # seem needed any more.
47 ADLC_CFLAGS_WARNINGS := -W3 -D_CRT_SECURE_NO_WARNINGS
48 endif
49
50 # Set the C++ standard if supported
51 ADLC_CFLAGS += $(ADLC_CXXFLAG)
52
53 # NOTE: The old build didn't set -DASSERT for windows but it doesn't seem to
54 # hurt.
55 ADLC_CFLAGS += -DASSERT
56
57 ADLC_CFLAGS += -D$(HOTSPOT_TARGET_CPU_DEFINE)
58
59 ADLC_CFLAGS += -I$(TOPDIR)/src/hotspot/share
60
61 $(eval $(call SetupNativeCompilation, BUILD_ADLC, \
62 NAME := adlc, \
63 TYPE := EXECUTABLE, \
64 TOOLCHAIN := TOOLCHAIN_BUILD_LINK_CXX, \
65 SRC := $(TOPDIR)/src/hotspot/share/adlc, \
66 EXTRA_FILES := $(TOPDIR)/src/hotspot/share/opto/opcodes.cpp, \
67 CFLAGS := $(ADLC_CFLAGS) $(ADLC_CFLAGS_WARNINGS), \
68 LDFLAGS := $(ADLC_LDFLAGS), \
69 LIBS := $(ADLC_LIBS), \
70 OBJECT_DIR := $(JVM_VARIANT_OUTPUTDIR)/tools/adlc/objs, \
71 OUTPUT_DIR := $(JVM_VARIANT_OUTPUTDIR)/tools/adlc, \
|
20 #
21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 # or visit www.oracle.com if you need additional information or have any
23 # questions.
24 #
25
26 $(eval $(call IncludeCustomExtension, hotspot/gensrc/GensrcAdlc.gmk))
27
28 ifeq ($(call check-jvm-feature, compiler2), true)
29
30 ADLC_SUPPORT_DIR := $(JVM_SUPPORT_DIR)/adlc
31
32 ##############################################################################
33 # Build the ad compiler (the adlc build tool)
34
35 # Flags depending on the build platform/tool chain
36 # NOTE: No optimization or debug flags set here
37 ifeq ($(call isBuildOs, linux), true)
38 ADLC_CFLAGS := -fno-exceptions -DLINUX
39 else ifeq ($(call isBuildOs, aix), true)
40 ADLC_LDFLAGS += -q64
41 ADLC_CFLAGS := -qnortti -qeh -q64 -DAIX
42 else ifeq ($(call isBuildOs, windows), true)
43 ADLC_LDFLAGS += -nologo
44 ADLC_CFLAGS := -nologo -EHsc
45 # NOTE: The old build also have -D_CRT_SECURE_NO_DEPRECATE but it doesn't
46 # seem needed any more.
47 ADLC_CFLAGS_WARNINGS := -W3 -D_CRT_SECURE_NO_WARNINGS
48 endif
49
50 # Set the C++ standard
51 ADLC_CFLAGS += $(ADLC_LANGSTD_CXXFLAG)
52
53 # NOTE: The old build didn't set -DASSERT for windows but it doesn't seem to
54 # hurt.
55 ADLC_CFLAGS += -DASSERT
56
57 ADLC_CFLAGS += -D$(HOTSPOT_TARGET_CPU_DEFINE)
58
59 ADLC_CFLAGS += -I$(TOPDIR)/src/hotspot/share
60
61 $(eval $(call SetupNativeCompilation, BUILD_ADLC, \
62 NAME := adlc, \
63 TYPE := EXECUTABLE, \
64 TOOLCHAIN := TOOLCHAIN_BUILD_LINK_CXX, \
65 SRC := $(TOPDIR)/src/hotspot/share/adlc, \
66 EXTRA_FILES := $(TOPDIR)/src/hotspot/share/opto/opcodes.cpp, \
67 CFLAGS := $(ADLC_CFLAGS) $(ADLC_CFLAGS_WARNINGS), \
68 LDFLAGS := $(ADLC_LDFLAGS), \
69 LIBS := $(ADLC_LIBS), \
70 OBJECT_DIR := $(JVM_VARIANT_OUTPUTDIR)/tools/adlc/objs, \
71 OUTPUT_DIR := $(JVM_VARIANT_OUTPUTDIR)/tools/adlc, \
|