TargetParser: Fix comments in enum(s) introduced in r239150. [-Wdocumentation]
[oota-llvm.git] / Makefile.config.in
1 #===-- Makefile.config - Local configuration for LLVM ------*- Makefile -*--===#
2 #
3 #                     The LLVM Compiler Infrastructure
4 #
5 # This file is distributed under the University of Illinois Open Source
6 # License. See LICENSE.TXT for details.
7 #
8 #===------------------------------------------------------------------------===#
9 #
10 # This file is included by Makefile.common.  It defines paths and other
11 # values specific to a particular installation of LLVM.
12 #
13 #===------------------------------------------------------------------------===#
14
15 # Define LLVM specific info and directories based on the autoconf variables
16 LLVMPackageName   := @PACKAGE_TARNAME@
17 LLVMVersion       := @PACKAGE_VERSION@
18 LLVM_VERSION_MAJOR := @LLVM_VERSION_MAJOR@
19 LLVM_VERSION_MINOR := @LLVM_VERSION_MINOR@
20 LLVM_VERSION_PATCH := @LLVM_VERSION_PATCH@
21 LLVM_VERSION_SUFFIX := @LLVM_VERSION_SUFFIX@
22 LLVM_CONFIGTIME   := @LLVM_CONFIGTIME@
23
24 ###########################################################################
25 # Directory Configuration
26 #       This section of the Makefile determines what is where.  To be
27 #       specific, there are several locations that need to be defined:
28 #
29 #       o LLVM_SRC_ROOT  : The root directory of the LLVM source code.
30 #       o LLVM_OBJ_ROOT  : The root directory containing the built LLVM code.
31 #
32 #       o PROJ_SRC_DIR  : The directory containing the code to build.
33 #       o PROJ_SRC_ROOT : The root directory of the code to build.
34 #
35 #       o PROJ_OBJ_DIR  : The directory in which compiled code will be placed.
36 #       o PROJ_OBJ_ROOT : The root directory in which compiled code is placed.
37 #
38 ###########################################################################
39
40 PWD := @BINPWD@
41 # Set the project name to LLVM if its not defined
42 ifndef PROJECT_NAME
43 PROJECT_NAME := $(LLVMPackageName)
44 endif
45
46 # The macro below is expanded when 'realpath' is not built-in.
47 # Built-in 'realpath' is available on GNU Make 3.81.
48 realpath = $(shell cd $(1); $(PWD))
49
50 PROJ_OBJ_DIR  := $(call realpath, .)
51 PROJ_OBJ_ROOT := $(call realpath, $(PROJ_OBJ_DIR)/$(LEVEL))
52
53 CLANG_SRC_ROOT  := @CLANG_SRC_ROOT@
54
55 ifeq ($(PROJECT_NAME),$(LLVMPackageName))
56 LLVM_SRC_ROOT   := $(call realpath, @abs_top_srcdir@)
57 LLVM_OBJ_ROOT   := $(call realpath, @abs_top_builddir@)
58 PROJ_SRC_ROOT   := $(LLVM_SRC_ROOT)
59 PROJ_SRC_DIR    := $(LLVM_SRC_ROOT)$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR))
60
61 # FIXME: This is temporary during the grace period where in-source builds are
62 # deprecated. Convert to a hard error when that period is up.
63 #
64 # See: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150323/268067.html
65 ifeq ($(LLVM_SRC_ROOT), $(LLVM_OBJ_ROOT))
66   $(warning ######################################################################################)
67   $(warning #                                                                                    #)
68   $(warning #                                   WARNING                                          #)
69   $(warning #                                                                                    #)
70   $(warning #                        In-source builds are deprecated.                            #)
71   $(warning #                                                                                    #)
72   $(warning #               Please configure from a separate build directory!                    #)
73   $(warning #                                                                                    #)
74   $(warning ######################################################################################)
75 endif
76
77 ifneq ($(CLANG_SRC_ROOT),)
78   CLANG_SRC_ROOT:= $(call realpath, $(CLANG_SRC_ROOT))
79   PROJ_SRC_DIR  := $(patsubst $(LLVM_SRC_ROOT)/tools/clang%,$(CLANG_SRC_ROOT)%,$(PROJ_SRC_DIR))
80 endif
81
82 prefix          := @prefix@
83 PROJ_prefix     := $(prefix)
84 program_prefix  := @program_prefix@
85 PROJ_VERSION    := $(LLVMVersion)
86 else
87 ifndef PROJ_SRC_ROOT
88 $(error Projects must define PROJ_SRC_ROOT)
89 endif
90 ifndef PROJ_OBJ_ROOT
91 $(error Projects must define PROJ_OBJ_ROOT)
92 endif
93 ifndef PROJ_INSTALL_ROOT
94 $(error Projects must define PROJ_INSTALL_ROOT)
95 endif
96 ifndef LLVM_SRC_ROOT
97 $(error Projects must define LLVM_SRC_ROOT)
98 endif
99 ifndef LLVM_OBJ_ROOT
100 $(error Projects must define LLVM_OBJ_ROOT)
101 endif
102 PROJ_SRC_DIR := $(call realpath, $(PROJ_SRC_ROOT)/$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR)))
103 prefix          := $(PROJ_INSTALL_ROOT)
104 PROJ_prefix     := $(prefix)
105 ifndef PROJ_VERSION
106 PROJ_VERSION := 1.0
107 endif
108 endif
109
110 INTERNAL_PREFIX := @INTERNAL_PREFIX@
111 ifneq ($(INTERNAL_PREFIX),)
112 PROJ_internal_prefix := $(INTERNAL_PREFIX)
113 else
114 PROJ_internal_prefix := $(prefix)
115 endif
116
117 PROJ_bindir     := $(PROJ_prefix)/bin
118 PROJ_libdir     := $(PROJ_prefix)/lib
119 PROJ_datadir    := $(PROJ_prefix)/share
120 PROJ_docsdir    := $(PROJ_prefix)/docs/llvm
121 PROJ_etcdir     := $(PROJ_prefix)/etc/llvm
122 PROJ_includedir := $(PROJ_prefix)/include
123 PROJ_infodir    := $(PROJ_prefix)/info
124 PROJ_mandir     := $(PROJ_prefix)/share/man
125
126 # Determine if we're on a unix type operating system
127 LLVM_ON_UNIX:=@LLVM_ON_UNIX@
128 LLVM_ON_WIN32:=@LLVM_ON_WIN32@
129
130 # Host operating system for which LLVM will be run.
131 OS=@OS@
132 HOST_OS=@HOST_OS@
133 # Target operating system for which LLVM will compile for.
134 TARGET_OS=@TARGET_OS@
135
136 # Host hardware architecture
137 HOST_ARCH=@HOST_ARCH@
138 # Target hardware architecture
139 ARCH=@ARCH@
140 TARGET_NATIVE_ARCH := $(ARCH)
141 LLVM_NATIVE_ARCH := @LLVM_NATIVE_ARCH@
142
143 # Indicates, whether we're cross-compiling LLVM or not
144 LLVM_CROSS_COMPILING=@LLVM_CROSS_COMPILING@
145
146 # Executable file extension for build platform (mainly for
147 # tablegen call if we're cross-compiling).
148 BUILD_EXEEXT=@BUILD_EXEEXT@
149
150 # Compilers for the build platflorm (mainly for tablegen
151 # call if we're cross-compiling).
152 BUILD_CC=@BUILD_CC@
153 BUILD_CXX=@BUILD_CXX@
154
155 # Triple for configuring build tools when cross-compiling
156 BUILD_TRIPLE=@build@
157
158 # Target triple (cpu-vendor-os) which LLVM is compiled for
159 HOST_TRIPLE=@host@
160
161 # Target triple (cpu-vendor-os) for which we should generate code
162 TARGET_TRIPLE=@target@
163
164 # Extra options to compile LLVM with
165 EXTRA_OPTIONS=@EXTRA_OPTIONS@
166
167 # Extra options to link LLVM with
168 EXTRA_LD_OPTIONS=@EXTRA_LD_OPTIONS@
169
170 # Endian-ness of the target
171 ENDIAN=@ENDIAN@
172
173 # Path to the C++ compiler to use.  This is an optional setting, which defaults
174 # to whatever your gmake defaults to.
175 CXX = @CXX@
176
177 # Path to the CC binary, which use used by testcases for native builds.
178 CC := @CC@
179
180 # C/C++ preprocessor flags.
181 CPPFLAGS += @CPPFLAGS@
182
183 # C compiler flags.
184 CFLAGS += @CFLAGS@
185
186 # C++ compiler flags.
187 CXXFLAGS += @CXXFLAGS@
188
189 # Linker flags.
190 LDFLAGS += @LDFLAGS@
191
192 # Path to the library archiver program.
193 AR_PATH = @AR@
194 AR = @AR@
195
196 # Path to the nm program
197 NM_PATH = @NM@
198
199 # The pathnames of the programs we require to build
200 CMP        := @CMP@
201 CP         := @CP@
202 DATE       := @DATE@
203 FIND       := @FIND@
204 GREP       := @GREP@
205 INSTALL    := @INSTALL@
206 MKDIR      := $(LLVM_SRC_ROOT)/autoconf/mkinstalldirs
207 MV         := @MV@
208 RANLIB     := @RANLIB@
209 RM         := @RM@
210 SED        := @SED@
211 TAR        := @TAR@
212 PYTHON     := @PYTHON@
213
214 # Paths to miscellaneous programs we hope are present but might not be
215 BZIP2      := @BZIP2@
216 CAT        := @CAT@
217 DOT        := @DOT@
218 DOXYGEN    := @DOXYGEN@
219 GROFF      := @GROFF@
220 GZIPBIN    := @GZIPBIN@
221 GO         := @GO@
222 OCAMLFIND  := @OCAMLFIND@
223 GAS        := @GAS@
224 POD2HTML   := @POD2HTML@
225 POD2MAN    := @POD2MAN@
226 PDFROFF    := @PDFROFF@
227 ZIP        := @ZIP@
228
229 HAVE_LIBZ  := @HAVE_LIBZ@
230 HAVE_DLOPEN := @HAVE_DLOPEN@
231 HAVE_PTHREAD := @HAVE_PTHREAD@
232 HAVE_TERMINFO := @HAVE_TERMINFO@
233
234 HAVE_OCAMLOPT := @HAVE_OCAMLOPT@
235 HAVE_OCAML_OUNIT := @HAVE_OCAML_OUNIT@
236
237 LIBS       := @LIBS@
238
239 # Targets that are possible to build
240 ALL_TARGETS := @ALL_TARGETS@
241
242 # Targets that we should build
243 TARGETS_TO_BUILD=@TARGETS_TO_BUILD@
244
245 # Targets supporting JIT
246 TARGETS_WITH_JIT := @TARGETS_WITH_JIT@
247
248 # Path to directory where object files should be stored during a build.
249 # Set OBJ_ROOT to "." if you do not want to use a separate place for
250 # object files.
251 OBJ_ROOT := .
252
253 # What to pass as rpath flag to g++
254 RPATH := @RPATH@
255
256 # What to pass as -rdynamic flag to g++
257 RDYNAMIC := @RDYNAMIC@
258
259 # These are options that can either be enabled here, or can be enabled on the
260 # make command line (ie, make ENABLE_PROFILING=1):
261
262 # When ENABLE_LIBCPP is enabled, LLVM uses libc++ by default to build.
263 #ENABLE_LIBCPP = 0
264 ENABLE_LIBCPP = @ENABLE_LIBCPP@
265
266 # When ENABLE_CXX1Y is enabled, LLVM uses c++1y mode by default to build.
267 # Otherwise it uses the baseline c++11.
268 ENABLE_CXX1Y = @ENABLE_CXX1Y@
269
270 # When ENABLE_SPLIT_DWARF is enabled, LLVM uses -gfission to build in debug mode.
271 ENABLE_SPLIT_DWARF = @ENABLE_SPLIT_DWARF@
272
273 # When enabled, clang will have plugin support.
274 CLANG_PLUGIN_SUPPORT = @CLANG_PLUGIN_SUPPORT@
275
276 # When ENABLE_CLANG_ARCMT is enabled, clang will have ARCMigrationTool.
277 ENABLE_CLANG_ARCMT = @ENABLE_CLANG_ARCMT@
278
279 # When ENABLE_CLANG_STATIC_ANALYZER is enabled, clang will have StaticAnalyzer.
280 ENABLE_CLANG_STATIC_ANALYZER = @ENABLE_CLANG_STATIC_ANALYZER@
281
282 # When ENABLE_WERROR is enabled, we'll pass -Werror on the command line
283 ENABLE_WERROR = @ENABLE_WERROR@
284
285 # When ENABLE_TERMINFO is enabled, we use terminfo.
286 ENABLE_TERMINFO = @ENABLE_TERMINFO@
287
288 # When ENABLE_OPTIMIZED is enabled, LLVM code is optimized and output is put
289 # into the "Release" directories. Otherwise, LLVM code is not optimized and
290 # output is put in the "Debug" directories.
291 #ENABLE_OPTIMIZED = 1
292 @ENABLE_OPTIMIZED@
293
294 # When ENABLE_PROFILING is enabled, profile instrumentation is done
295 # and output is put into the "<Flavor>+Profile" directories, where
296 # <Flavor> is either Debug or Release depending on how other build
297 # flags are set. Otherwise, output is put in the <Flavor>
298 # directories.
299 #ENABLE_PROFILING = 1
300 @ENABLE_PROFILING@
301
302 # When DISABLE_ASSERTIONS is enabled, builds of all of the LLVM code will
303 # exclude assertion checks, otherwise they are included.
304 #DISABLE_ASSERTIONS = 1
305 @DISABLE_ASSERTIONS@
306
307 # When ENABLE_EXPENSIVE_CHECKS is enabled, builds of all of the LLVM
308 # code will include expensive checks, otherwise they are excluded.
309 #ENABLE_EXPENSIVE_CHECKS = 0
310 @ENABLE_EXPENSIVE_CHECKS@
311
312 # --enable-abi-breaking-checks : decide whether we should compile in asserts and
313 # checks that make the build ABI incompatible with an llvm built without these
314 # checks enabled.
315 ENABLE_ABI_BREAKING_CHECKS = @ENABLE_ABI_BREAKING_CHECKS@
316
317 # When DEBUG_RUNTIME is enabled, the runtime libraries will retain debug
318 # symbols.
319 #DEBUG_RUNTIME = 1
320 @DEBUG_RUNTIME@
321
322 # When DEBUG_SYMBOLS is enabled, the compiler libraries will retain debug
323 # symbols.
324 #DEBUG_SYMBOLS = 1
325 @DEBUG_SYMBOLS@
326
327 # When KEEP_SYMBOLS is enabled, installed executables will never have their
328 # symbols stripped.
329 #KEEP_SYMBOLS = 1
330 @KEEP_SYMBOLS@
331
332 # The compiler flags to use for optimized builds.
333 OPTIMIZE_OPTION := @OPTIMIZE_OPTION@
334
335 # When ENABLE_PROFILING is enabled, the llvm source base is built with profile
336 # information to allow gprof to be used to get execution frequencies.
337 #ENABLE_PROFILING = 1
338
339 # When ENABLE_DOCS is disabled, docs/ will not be built.
340 ENABLE_DOCS = @ENABLE_DOCS@
341
342 # When ENABLE_DOXYGEN is enabled, the doxygen documentation will be built
343 ENABLE_DOXYGEN = @ENABLE_DOXYGEN@
344
345 # Do we want to enable threads?
346 ENABLE_THREADS := @LLVM_ENABLE_THREADS@
347
348 # Do we want to enable zlib?
349 ENABLE_ZLIB := @LLVM_ENABLE_ZLIB@
350
351 # Do we want to build with position independent code?
352 ENABLE_PIC := @ENABLE_PIC@
353
354 # Do we want to build a shared library and link the tools with it?
355 ENABLE_SHARED := @ENABLE_SHARED@
356
357 # Do we want to link the stdc++ into a shared library? (Cygming)
358 ENABLE_EMBED_STDCXX := @ENABLE_EMBED_STDCXX@
359
360 # Use -fvisibility-inlines-hidden?
361 ENABLE_VISIBILITY_INLINES_HIDDEN := @ENABLE_VISIBILITY_INLINES_HIDDEN@
362
363 # Do we want to allow timestamping information into builds?
364 ENABLE_TIMESTAMPS := @ENABLE_TIMESTAMPS@
365
366 # This option tells the Makefiles to produce verbose output.
367 # It essentially prints the commands that make is executing
368 #VERBOSE = 1
369
370 # Enable JIT for this platform
371 TARGET_HAS_JIT = @TARGET_HAS_JIT@
372
373 # Shared library extension for host platform.
374 SHLIBEXT = @SHLIBEXT@
375
376 # Executable file extension for host platform.
377 EXEEXT = @EXEEXT@
378
379 # Things we just assume are "there"
380 ECHO := echo
381
382 # Get the options for causing archives to link all their content instead of
383 # just missing symbols, and the inverse of that. This is used for certain LLVM
384 # tools that permit loadable modules. It ensures that the LLVM symbols will be
385 # available to those loadable modules.
386 LINKALL := @LINKALL@
387 NOLINKALL := @NOLINKALL@
388
389 # Get the value of HUGE_VAL_SANITY which will be either "yes" or "no" depending
390 # on the check.
391 HUGE_VAL_SANITY = @HUGE_VAL_SANITY@
392
393 # Bindings that we should build
394 BINDINGS_TO_BUILD := @BINDINGS_TO_BUILD@
395 OCAML_LIBDIR      := @OCAML_LIBDIR@
396
397 # When compiling under Mingw/Cygwin, executables such as tblgen
398 # expect Windows paths, whereas the build system uses Unix paths.
399 # The function SYSPATH transforms Unix paths into Windows paths.
400 ifneq (,$(findstring -mno-cygwin, $(CXX)))
401   SYSPATH = $(shell echo $(1) | cygpath -m -f -)
402 else
403   SYSPATH = $(1)
404 endif
405
406 # Location of the plugin header file for gold.
407 BINUTILS_INCDIR := @BINUTILS_INCDIR@
408
409 # Optional flags supported by the compiler
410 # -Wno-missing-field-initializers
411 NO_MISSING_FIELD_INITIALIZERS = @NO_MISSING_FIELD_INITIALIZERS@
412 # -Wno-variadic-macros
413 NO_VARIADIC_MACROS = @NO_VARIADIC_MACROS@
414 # -Wcovered-switch-default
415 COVERED_SWITCH_DEFAULT = @COVERED_SWITCH_DEFAULT@
416 # -Wno-uninitialized
417 NO_UNINITIALIZED = @NO_UNINITIALIZED@
418 # -Wno-maybe-uninitialized
419 NO_MAYBE_UNINITIALIZED = @NO_MAYBE_UNINITIALIZED@
420 # -Wno-comment
421 NO_COMMENT = @NO_COMMENT@
422
423 # Was polly found in tools/polly?
424 LLVM_HAS_POLLY = @LLVM_HAS_POLLY@
425 # Flags supported by the linker.
426 # bfd ld / gold --version-script=file
427 HAVE_LINK_VERSION_SCRIPT = @HAVE_LINK_VERSION_SCRIPT@
428
429 # Flags to control using libxml2
430 LIBXML2_LIBS := @LIBXML2_LIBS@
431 LIBXML2_INC  := @LIBXML2_INC@
432
433 # Flags to control building support for Intel JIT Events API
434 USE_INTEL_JITEVENTS := @USE_INTEL_JITEVENTS@
435 INTEL_JITEVENTS_INCDIR := @INTEL_JITEVENTS_INCDIR@
436 INTEL_JITEVENTS_LIBDIR := @INTEL_JITEVENTS_LIBDIR@
437
438 # Flags to control building support for OProfile JIT API
439 USE_OPROFILE := @USE_OPROFILE@
440
441 ifeq ($(USE_INTEL_JITEVENTS), 1)
442   OPTIONAL_COMPONENTS += IntelJITEvents
443 endif
444 ifeq ($(USE_OPROFILE), 1)
445   OPTIONAL_COMPONENTS += OProfileJIT
446 endif