1 #
2 # Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # This code is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License version 2 only, as
7 # published by the Free Software Foundation. Oracle designates this
8 # particular file as subject to the "Classpath" exception as provided
9 # by Oracle in the LICENSE file that accompanied this code.
10 #
11 # This code is distributed in the hope that it will be useful, but WITHOUT
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 # version 2 for more details (a copy is included in the LICENSE file that
15 # accompanied this code).
16 #
17 # You should have received a copy of the GNU General Public License version
18 # 2 along with this work; if not, write to the Free Software Foundation,
19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
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
46 else ifeq ($(OPENJDK_BUILD_OS), windows)
47 ADLC_LDFLAGS := -nologo
48 ADLC_CFLAGS := -nologo -EHsc
49 # NOTE: The old build also have -D_CRT_SECURE_NO_DEPRECATE but it doesn't
50 # seem needed any more.
51 ADLC_CFLAGS_WARNINGS := -W3 -D_CRT_SECURE_NO_WARNINGS
52 endif
53
54 # Set the C++ standard if supported
55 ADLC_CFLAGS += $(CXXSTD_CXXFLAG)
56
57 # NOTE: The old build didn't set -DASSERT for windows but it doesn't seem to
58 # hurt.
59 ADLC_CFLAGS += -DASSERT
60
61 ADLC_CFLAGS += -D$(HOTSPOT_TARGET_CPU_DEFINE)
62
63 ADLC_CFLAGS += -I$(TOPDIR)/src/hotspot/share
64
65 $(eval $(call SetupNativeCompilation, BUILD_ADLC, \
66 TOOLCHAIN := TOOLCHAIN_BUILD_LINK_CXX, \
67 SRC := $(TOPDIR)/src/hotspot/share/adlc, \
68 EXTRA_FILES := $(TOPDIR)/src/hotspot/share/opto/opcodes.cpp, \
69 CFLAGS := $(ADLC_CFLAGS) $(ADLC_CFLAGS_WARNINGS), \
70 LDFLAGS := $(ADLC_LDFLAGS), \
71 LIBS := $(ADLC_LIBS), \
72 OBJECT_DIR := $(JVM_VARIANT_OUTPUTDIR)/tools/adlc/objs, \
73 OUTPUT_DIR := $(JVM_VARIANT_OUTPUTDIR)/tools/adlc, \
74 PROGRAM := adlc, \
75 DEBUG_SYMBOLS := false, \
76 DISABLED_WARNINGS_clang := tautological-compare, \
77 DISABLED_WARNINGS_solstudio := notemsource, \
78 ))
79
80 ADLC_TOOL := $(BUILD_ADLC_TARGET)
81
82 ##############################################################################
83 # Transform the ad source files into C++ source files using adlc
84
85 # Setup flags for the adlc build tool (ADLCFLAGS).
86 ADLCFLAGS += -q -T
87
88 # ADLC flags depending on target OS
89 ifeq ($(OPENJDK_TARGET_OS), linux)
90 ADLCFLAGS += -DLINUX=1 -D_GNU_SOURCE=1
91 else ifeq ($(OPENJDK_TARGET_OS), solaris)
92 ADLCFLAGS += -DSOLARIS=1 -DSPARC_WORKS=1
93 else ifeq ($(OPENJDK_TARGET_OS), aix)
94 ADLCFLAGS += -DAIX=1
|
1 #
2 # Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # This code is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License version 2 only, as
7 # published by the Free Software Foundation. Oracle designates this
8 # particular file as subject to the "Classpath" exception as provided
9 # by Oracle in the LICENSE file that accompanied this code.
10 #
11 # This code is distributed in the hope that it will be useful, but WITHOUT
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 # version 2 for more details (a copy is included in the LICENSE file that
15 # accompanied this code).
16 #
17 # You should have received a copy of the GNU General Public License version
18 # 2 along with this work; if not, write to the Free Software Foundation,
19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
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
46 else ifeq ($(OPENJDK_BUILD_OS), windows)
47 ADLC_LDFLAGS := -nologo
48 ADLC_CFLAGS := -nologo -EHsc
49 # NOTE: The old build also have -D_CRT_SECURE_NO_DEPRECATE but it doesn't
50 # seem needed any more.
51 ADLC_CFLAGS_WARNINGS := -W3 -D_CRT_SECURE_NO_WARNINGS
52 endif
53
54 # Set the C++ standard if supported
55 ADLC_CFLAGS += $(CXXSTD_CXXFLAG)
56
57 # NOTE: The old build didn't set -DASSERT for windows but it doesn't seem to
58 # hurt.
59 ADLC_CFLAGS += -DASSERT
60
61 ADLC_CFLAGS += -D$(HOTSPOT_TARGET_CPU_DEFINE)
62
63 ADLC_CFLAGS += -I$(TOPDIR)/src/hotspot/share
64
65 $(eval $(call SetupNativeCompilation, BUILD_ADLC, \
66 NAME := adlc, \
67 TYPE := EXECUTABLE, \
68 TOOLCHAIN := TOOLCHAIN_BUILD_LINK_CXX, \
69 SRC := $(TOPDIR)/src/hotspot/share/adlc, \
70 EXTRA_FILES := $(TOPDIR)/src/hotspot/share/opto/opcodes.cpp, \
71 CFLAGS := $(ADLC_CFLAGS) $(ADLC_CFLAGS_WARNINGS), \
72 LDFLAGS := $(ADLC_LDFLAGS), \
73 LIBS := $(ADLC_LIBS), \
74 OBJECT_DIR := $(JVM_VARIANT_OUTPUTDIR)/tools/adlc/objs, \
75 OUTPUT_DIR := $(JVM_VARIANT_OUTPUTDIR)/tools/adlc, \
76 DEBUG_SYMBOLS := false, \
77 DISABLED_WARNINGS_clang := tautological-compare, \
78 DISABLED_WARNINGS_solstudio := notemsource, \
79 ))
80
81 ADLC_TOOL := $(BUILD_ADLC_TARGET)
82
83 ##############################################################################
84 # Transform the ad source files into C++ source files using adlc
85
86 # Setup flags for the adlc build tool (ADLCFLAGS).
87 ADLCFLAGS += -q -T
88
89 # ADLC flags depending on target OS
90 ifeq ($(OPENJDK_TARGET_OS), linux)
91 ADLCFLAGS += -DLINUX=1 -D_GNU_SOURCE=1
92 else ifeq ($(OPENJDK_TARGET_OS), solaris)
93 ADLCFLAGS += -DSOLARIS=1 -DSPARC_WORKS=1
94 else ifeq ($(OPENJDK_TARGET_OS), aix)
95 ADLCFLAGS += -DAIX=1
|