-
Notifications
You must be signed in to change notification settings - Fork 21
/
Makefile.config.in
250 lines (204 loc) · 6.36 KB
/
Makefile.config.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
PROJECT_NAME = @PACKAGE_NAME@
PROJ_VERSION = @PACKAGE_VERSION@
#
# Set this variable to the top of the LLVM source tree.
#
LLVM_SRC_ROOT = @LLVM_SRC@
#
# Set this variable to the top level directory where LLVM was built
# (this is *not* the same as OBJ_ROOT as defined in LLVM's Makefile.config).
#
LLVM_OBJ_ROOT = @LLVM_OBJ@
# Set this variable based on whether or not we have access to LLVM source and
# object trees.
ifeq ($(LLVM_SRC_ROOT),no)
HAS_LLVM := 0
else
ifeq ($(LLVM_OBJ_ROOT),no)
HAS_LLVM := 0
else
HAS_LLVM := 1
endif
endif
# Set the directory root of this project's source files
PROJ_SRC_ROOT := $(subst //,/,@abs_top_srcdir@)
# Set the root directory of this project's object files
PROJ_OBJ_ROOT := $(subst //,/,@abs_top_builddir@)
# Set the root directory of this project's install prefix
PROJ_INSTALL_ROOT := @prefix@
program_prefix := @program_prefix@
# Include LLVM's configuration Makefile, if available.
ifeq ($(HAS_LLVM),1)
include $(LLVM_OBJ_ROOT)/Makefile.config
else
# Otherwise, define specific things we know we need.
realpath = $(shell cd $(1); $(PWD))
PROJ_OBJ_DIR := $(call realpath, .)
PROJ_OBJ_ROOT := $(call realpath, $(PROJ_OBJ_DIR)/$(LEVEL))
PROJ_SRC_DIR := $(call realpath, $(PROJ_SRC_ROOT)/$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR)))
CP := cp
DATE := date
DOT := dot
ECHO := echo
INSTALL := install
LIBS :=
MKDIR := mkdir
MV := mv
PWD := pwd
RM := rm
SED := sed
# Configure parameters.
TARGET_OS := @TARGET_OS@
ARCH := @ARCH@
ENDIAN := @ENDIAN@
endif
# Include the target config specific flags.
-include $(PROJ_OBJ_ROOT)/tools/TargetConfig.mk
# Define TCLSH here if LLVM's configuration Makefile is unavailable
# or it does not define TCLSH.
ifndef TCLSH
TCLSH := tclsh
endif
# Ignore the LIBS set by $(LLVM_OBJ_ROOT)/Makefile.config
LIBS :=
# Set SourceDir for backwards compatibility.
ifndef SourceDir
SourceDir=$(PROJ_SRC_DIR)
endif
ORIGINAL_CC := "$(CC)"
ORIGINAL_CXX := "$(CC)"
ifdef TARGET_ARCH
ARCH := $(TARGET_ARCH)
endif
ifdef TARGET_CC
CC := $(TARGET_CC)
endif
ifdef TARGET_CXX
CXX := $(TARGET_CXX)
endif
# Path to location for LLVM C/C++ front-end. You can modify this if you
# want to override the value set by configure.
LLVMGCCDIR := @LLVMGCCDIR@
# Full pathnames of LLVM C/C++ front-end 'cc1' and 'cc1plus' binaries:
LLVMGCC := @LLVMGCC@
LLVMGXX := @LLVMGXX@
LLVMCC1 := @LLVMCC1@
LLVMCC1PLUS := @LLVMCC1PLUS@
LLVMGCC_LANGS := @LLVMGCC_LANGS@
LLVMGCC_DRAGONEGG := @LLVMGCC_DRAGONEGG@
# Information on Clang, if configured.
CLANGPATH := @CLANGPATH@
CLANGXXPATH := @CLANGXXPATH@
ENABLE_BUILT_CLANG := @ENABLE_BUILT_CLANG@
# The LLVM capable compiler to use.
LLVMCC_OPTION := @LLVMCC_OPTION@
# The flag used to emit LLVM IR.
LLVMCC_EMITIR_FLAG = @LLVMCC_EMITIR_FLAG@
LLVMCC_DISABLEOPT_FLAGS := @LLVMCC_DISABLEOPT_FLAGS@
ifdef TARGET_LLVMGCC
LLVMGCC := $(TARGET_LLVMGCC)
LLVMCC := $(TARGET_LLVMGCC)
LLVMCC_OPTION := llvm-gcc
endif
ifdef TARGET_LLVMGXX
LLVMGXX := $(TARGET_LLVMGXX)
LLVMCXX := $(TARGET_LLVMGXX)
LLVMCC_OPTION := llvm-gcc
endif
ifdef TARGET_LLVMGCCARCH
LLVMGCCARCH := $(TARGET_LLVMGCCARCH)
endif
ifeq ($(ARCH),THUMB)
TEST_TARGET_FLAGS += -mthumb
endif
ifeq ($(ARCH),XCore)
ifndef XCORE_TARGET_NEEDS_MEMORY
# The default memory for all tests is 32MB (rather than the usual default of 64K).
# (32MB target memory requires ~300MB of host memory)
XCORE_TARGET_NEEDS_MEMORY := 32
endif
XCORE_TARGET_FLAGS := --target=xcore -fcommon -fexceptions -mcmodel=large
XCORE_TARGET_FLAGS += -Wl,-target=XS1-L1,-Xmapper,--defsymbol,-Xmapper,CmdLineWords=400
XCORE_TARGET_FLAGS += -Wl,-Xmapper,--image-size,-Xmapper,$$(($(XCORE_TARGET_NEEDS_MEMORY) * 0x100000)),-Xmapper,--image-base,-Xmapper,$$(($(XCORE_TARGET_NEEDS_MEMORY) * 0x100000))
endif
# PowerPC/Linux needs -ffp-contract=off so that:
# The outputs can be compared to gcc.
# The outputs match the reference outputs.
ifeq ($(ARCH),PowerPC)
ifeq ($(TARGET_OS),Linux)
TEST_TARGET_FLAGS += -ffp-contract=off
endif
endif
#
# Provide variables specific to llvm-test
#
# SPEC benchmarks:
# If these are set then run the SPEC benchmarks.
# You must provide the SPEC benchmarks on your own.
@USE_SPEC2006@
@USE_SPEC2000@
@USE_SPEC95@
# Path to the SPEC benchmarks.
SPEC2006_ROOT := @SPEC2006_ROOT@
SPEC2000_ROOT := @SPEC2000_ROOT@
SPEC95_ROOT := @SPEC95_ROOT@
# F2C: Enable LLVM to run Fortran benchmarks without a Fortran front-end
@USE_F2C@
F2C_DIR := @F2C_DIR@
F2C := @F2C@
F2C_INC := @F2C_INC@
F2C_LIB := @F2C_LIB@
# F95: Enable LLVM to run Fortran benchmarks without a Fortran front-end
@USE_F95@
F95_DIR := @F95_DIR@
F95 := @F95@
F95_INC := @F95_INC@
F95_LIB := @F95_LIB@
# Path to the Povray source code.
@USE_POVRAY@
POVRAY_ROOT := @POVRAY_ROOT@
# Path to the Namd source code
@USE_NAMD@
NAMD_ROOT := @NAMD_ROOT@
# Path to the Sweep3d source code
@USE_SWEEP3D@
SWEEP3D_ROOT := @SWEEP3D_ROOT@
# Path to the fpgrowth source code
@USE_FPGROWTH@
FPGROWTH_ROOT := @FPGROWTH_ROOT@
# Path to the ALP source code
@USE_ALP@
ALP_ROOT := @ALP_ROOT@
# Path to the NURBS source code
@USE_NURBS@
NURBS_ROOT := @NURBS_ROOT@
# Path to the HMMER source code
@USE_HMMER@
HMMER_ROOT := @HMMER_ROOT@
# Path to the Skidmarks source code
@USE_SKIDMARKS10@
SKIDMARKS10_ROOT := @SKIDMARKS10_ROOT@
# Disable LLC diffs for testing.
@DISABLE_LLC_DIFFS@
# Define HAVE_RE_COMP to 1 if re_comp is found, don't define it otherwise
@HAVE_RE_COMP@
# Get the shared library (dll) extension
SHLIBEXT = @SHLIBEXT@
# Get CPU features
HAVE_X86_AVX2_INSTRUCTIONS := @HAVE_X86_AVX2_INSTRUCTIONS@
HAVE_X86_AVX512F_INSTRUCTIONS := @HAVE_X86_AVX512F_INSTRUCTIONS@
HAVE_X86_AVX512VL_INSTRUCTIONS := @HAVE_X86_AVX512VL_INSTRUCTIONS@
HAVE_X86_AVX512BW_INSTRUCTIONS := @HAVE_X86_AVX512BW_INSTRUCTIONS@
HAVE_X86_AVX512DQ_INSTRUCTIONS := @HAVE_X86_AVX512DQ_INSTRUCTIONS@
HAVE_X86_AVX_INSTRUCTIONS := @HAVE_X86_AVX_INSTRUCTIONS@
HAVE_X86_BMI2_INSTRUCTIONS := @HAVE_X86_BMI2_INSTRUCTIONS@
HAVE_X86_BMI_INSTRUCTIONS := @HAVE_X86_BMI_INSTRUCTIONS@
HAVE_X86_FMA4_INSTRUCTIONS := @HAVE_X86_FMA4_INSTRUCTIONS@
HAVE_X86_FMA_INSTRUCTIONS := @HAVE_X86_FMA_INSTRUCTIONS@
HAVE_X86_MMX_INSTRUCTIONS := @HAVE_X86_MMX_INSTRUCTIONS@
HAVE_X86_POPCNT_INSTRUCTIONS := @HAVE_X86_POPCNT_INSTRUCTIONS@
HAVE_X86_SSE2_INSTRUCTIONS := @HAVE_X86_SSE2_INSTRUCTIONS@
HAVE_X86_SSE3_INSTRUCTIONS := @HAVE_X86_SSE3_INSTRUCTIONS@
HAVE_X86_SSE4_1_INSTRUCTIONS := @HAVE_X86_SSE4_1_INSTRUCTIONS@
HAVE_X86_SSE4_2_INSTRUCTIONS := @HAVE_X86_SSE4_2_INSTRUCTIONS@
HAVE_X86_SSE_INSTRUCTIONS := @HAVE_X86_SSE_INSTRUCTIONS@