]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - opencl/llvm.git/blob - Makefile.config.in
Debug info: Bugfix for r201190: DW_OP_piece takes bytes, not bits.
[opencl/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 #===------------------------------------------------------------------------===#
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_CONFIGTIME   := @LLVM_CONFIGTIME@
22 ###########################################################################
23 # Directory Configuration
24 #       This section of the Makefile determines what is where.  To be
25 #       specific, there are several locations that need to be defined:
26 #
27 #       o LLVM_SRC_ROOT  : The root directory of the LLVM source code.
28 #       o LLVM_OBJ_ROOT  : The root directory containing the built LLVM code.
29 #
30 #       o PROJ_SRC_DIR  : The directory containing the code to build.
31 #       o PROJ_SRC_ROOT : The root directory of the code to build.
32 #
33 #       o PROJ_OBJ_DIR  : The directory in which compiled code will be placed.
34 #       o PROJ_OBJ_ROOT : The root directory in which compiled code is placed.
35 #
36 ###########################################################################
38 PWD := @BINPWD@
39 # Set the project name to LLVM if its not defined
40 ifndef PROJECT_NAME
41 PROJECT_NAME := $(LLVMPackageName)
42 endif
44 # The macro below is expanded when 'realpath' is not built-in.
45 # Built-in 'realpath' is available on GNU Make 3.81.
46 realpath = $(shell cd $(1); $(PWD))
48 PROJ_OBJ_DIR  := $(call realpath, .)
49 PROJ_OBJ_ROOT := $(call realpath, $(PROJ_OBJ_DIR)/$(LEVEL))
51 CLANG_SRC_ROOT  := @CLANG_SRC_ROOT@
53 ifeq ($(PROJECT_NAME),$(LLVMPackageName))
54 LLVM_SRC_ROOT   := $(call realpath, @abs_top_srcdir@)
55 LLVM_OBJ_ROOT   := $(call realpath, @abs_top_builddir@)
56 PROJ_SRC_ROOT   := $(LLVM_SRC_ROOT)
57 PROJ_SRC_DIR    := $(LLVM_SRC_ROOT)$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR))
59 ifneq ($(CLANG_SRC_ROOT),)
60   CLANG_SRC_ROOT:= $(call realpath, $(CLANG_SRC_ROOT))
61   PROJ_SRC_DIR  := $(patsubst $(LLVM_SRC_ROOT)/tools/clang%,$(CLANG_SRC_ROOT)%,$(PROJ_SRC_DIR))
62 endif
64 prefix          := @prefix@
65 PROJ_prefix     := $(prefix)
66 program_prefix  := @program_prefix@
67 PROJ_VERSION    := $(LLVMVersion)
68 else
69 ifndef PROJ_SRC_ROOT
70 $(error Projects must define PROJ_SRC_ROOT)
71 endif
72 ifndef PROJ_OBJ_ROOT
73 $(error Projects must define PROJ_OBJ_ROOT)
74 endif
75 ifndef PROJ_INSTALL_ROOT
76 $(error Projects must define PROJ_INSTALL_ROOT)
77 endif
78 ifndef LLVM_SRC_ROOT
79 $(error Projects must define LLVM_SRC_ROOT)
80 endif
81 ifndef LLVM_OBJ_ROOT
82 $(error Projects must define LLVM_OBJ_ROOT)
83 endif
84 PROJ_SRC_DIR := $(call realpath, $(PROJ_SRC_ROOT)/$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR)))
85 prefix          := $(PROJ_INSTALL_ROOT)
86 PROJ_prefix     := $(prefix)
87 ifndef PROJ_VERSION
88 PROJ_VERSION := 1.0
89 endif
90 endif
92 INTERNAL_PREFIX := @INTERNAL_PREFIX@
93 ifneq ($(INTERNAL_PREFIX),)
94 PROJ_internal_prefix := $(INTERNAL_PREFIX)
95 else
96 PROJ_internal_prefix := $(prefix)
97 endif
99 PROJ_bindir     := $(PROJ_prefix)/bin
100 PROJ_libdir     := $(PROJ_prefix)/lib
101 PROJ_datadir    := $(PROJ_prefix)/share
102 PROJ_docsdir    := $(PROJ_prefix)/docs/llvm
103 PROJ_etcdir     := $(PROJ_prefix)/etc/llvm
104 PROJ_includedir := $(PROJ_prefix)/include
105 PROJ_infodir    := $(PROJ_prefix)/info
106 PROJ_mandir     := $(PROJ_prefix)/share/man
108 # Determine if we're on a unix type operating system
109 LLVM_ON_UNIX:=@LLVM_ON_UNIX@
110 LLVM_ON_WIN32:=@LLVM_ON_WIN32@
112 # Host operating system for which LLVM will be run.
113 OS=@OS@
114 HOST_OS=@HOST_OS@
115 # Target operating system for which LLVM will compile for.
116 TARGET_OS=@TARGET_OS@
118 # Host hardware architecture
119 HOST_ARCH=@HOST_ARCH@
120 # Target hardware architecture
121 ARCH=@ARCH@
122 TARGET_NATIVE_ARCH := $(ARCH)
123 LLVM_NATIVE_ARCH := @LLVM_NATIVE_ARCH@
125 # Indicates, whether we're cross-compiling LLVM or not
126 LLVM_CROSS_COMPILING=@LLVM_CROSS_COMPILING@
128 # Executable file extension for build platform (mainly for
129 # tablegen call if we're cross-compiling).
130 BUILD_EXEEXT=@BUILD_EXEEXT@
132 # Compilers for the build platflorm (mainly for tablegen
133 # call if we're cross-compiling).
134 BUILD_CC=@BUILD_CC@
135 BUILD_CXX=@BUILD_CXX@
137 # Triple for configuring build tools when cross-compiling
138 BUILD_TRIPLE=@build@
140 # Target triple (cpu-vendor-os) which LLVM is compiled for
141 HOST_TRIPLE=@host@
143 # Target triple (cpu-vendor-os) for which we should generate code
144 TARGET_TRIPLE=@target@
146 # Extra options to compile LLVM with
147 EXTRA_OPTIONS=@EXTRA_OPTIONS@
149 # Extra options to link LLVM with
150 EXTRA_LD_OPTIONS=@EXTRA_LD_OPTIONS@
152 # Endian-ness of the target
153 ENDIAN=@ENDIAN@
155 # Path to the C++ compiler to use.  This is an optional setting, which defaults
156 # to whatever your gmake defaults to.
157 CXX = @CXX@
159 # Path to the CC binary, which use used by testcases for native builds.
160 CC := @CC@
162 # C/C++ preprocessor flags.
163 CPPFLAGS += @CPPFLAGS@
165 # C compiler flags.
166 CFLAGS += @CFLAGS@
168 # C++ compiler flags.
169 CXXFLAGS += @CXXFLAGS@
171 # Linker flags.
172 LDFLAGS += @LDFLAGS@
174 # Path to the library archiver program.
175 AR_PATH = @AR@
176 AR = @AR@
178 # Path to the nm program
179 NM_PATH = @NM@
181 # The pathnames of the programs we require to build
182 CMP        := @CMP@
183 CP         := @CP@
184 DATE       := @DATE@
185 FIND       := @FIND@
186 GREP       := @GREP@
187 INSTALL    := @INSTALL@
188 MKDIR      := $(LLVM_SRC_ROOT)/autoconf/mkinstalldirs
189 MV         := @MV@
190 RANLIB     := @RANLIB@
191 RM         := @RM@
192 SED        := @SED@
193 TAR        := @TAR@
194 PYTHON     := @PYTHON@
196 # Paths to miscellaneous programs we hope are present but might not be
197 BZIP2      := @BZIP2@
198 CAT        := @CAT@
199 DOT        := @DOT@
200 DOXYGEN    := @DOXYGEN@
201 GROFF      := @GROFF@
202 GZIPBIN    := @GZIPBIN@
203 OCAMLC     := @OCAMLC@
204 OCAMLOPT   := @OCAMLOPT@
205 OCAMLDEP   := @OCAMLDEP@
206 OCAMLDOC   := @OCAMLDOC@
207 GAS        := @GAS@
208 POD2HTML   := @POD2HTML@
209 POD2MAN    := @POD2MAN@
210 PDFROFF    := @PDFROFF@
211 ZIP        := @ZIP@
213 HAVE_LIBZ  := @HAVE_LIBZ@
214 HAVE_DLOPEN := @HAVE_DLOPEN@
215 HAVE_PTHREAD := @HAVE_PTHREAD@
216 HAVE_TERMINFO := @HAVE_TERMINFO@
218 LIBS       := @LIBS@
220 # Targets that are possible to build
221 ALL_TARGETS := @ALL_TARGETS@
223 # Targets that we should build
224 TARGETS_TO_BUILD=@TARGETS_TO_BUILD@
226 # Targets supporting JIT
227 TARGETS_WITH_JIT := @TARGETS_WITH_JIT@
229 # Path to directory where object files should be stored during a build.
230 # Set OBJ_ROOT to "." if you do not want to use a separate place for
231 # object files.
232 OBJ_ROOT := .
234 # What to pass as rpath flag to g++
235 RPATH := @RPATH@
237 # What to pass as -rdynamic flag to g++
238 RDYNAMIC := @RDYNAMIC@
240 # These are options that can either be enabled here, or can be enabled on the
241 # make command line (ie, make ENABLE_PROFILING=1):
243 # When ENABLE_LIBCPP is enabled, LLVM uses libc++ by default to build.
244 #ENABLE_LIBCPP = 0
245 ENABLE_LIBCPP = @ENABLE_LIBCPP@
247 # When ENABLE_CXX11 is enabled, LLVM uses c++11 mode by default to build.
248 ENABLE_CXX11 = @ENABLE_CXX11@
250 # When ENABLE_SPLIT_DWARF is enabled, LLVM uses -gfission to build in debug mode.
251 ENABLE_SPLIT_DWARF = @ENABLE_SPLIT_DWARF@
253 # When ENABLE_CLANG_ARCMT is enabled, clang will have ARCMigrationTool.
254 ENABLE_CLANG_ARCMT = @ENABLE_CLANG_ARCMT@
256 # When ENABLE_CLANG_REWRITER is enabled, clang will have Rewriter.
257 ENABLE_CLANG_REWRITER = @ENABLE_CLANG_REWRITER@
259 # When ENABLE_CLANG_STATIC_ANALYZER is enabled, clang will have StaticAnalyzer.
260 ENABLE_CLANG_STATIC_ANALYZER = @ENABLE_CLANG_STATIC_ANALYZER@
262 # When ENABLE_WERROR is enabled, we'll pass -Werror on the command line
263 ENABLE_WERROR = @ENABLE_WERROR@
265 # When ENABLE_TERMINFO is enabled, we use terminfo.
266 ENABLE_TERMINFO = @ENABLE_TERMINFO@
268 # When ENABLE_OPTIMIZED is enabled, LLVM code is optimized and output is put
269 # into the "Release" directories. Otherwise, LLVM code is not optimized and
270 # output is put in the "Debug" directories.
271 #ENABLE_OPTIMIZED = 1
272 @ENABLE_OPTIMIZED@
274 # When ENABLE_PROFILING is enabled, profile instrumentation is done
275 # and output is put into the "<Flavor>+Profile" directories, where
276 # <Flavor> is either Debug or Release depending on how other build
277 # flags are set. Otherwise, output is put in the <Flavor>
278 # directories.
279 #ENABLE_PROFILING = 1
280 @ENABLE_PROFILING@
282 # When DISABLE_ASSERTIONS is enabled, builds of all of the LLVM code will
283 # exclude assertion checks, otherwise they are included.
284 #DISABLE_ASSERTIONS = 1
285 @DISABLE_ASSERTIONS@
287 # When ENABLE_EXPENSIVE_CHECKS is enabled, builds of all of the LLVM
288 # code will include expensive checks, otherwise they are excluded.
289 #ENABLE_EXPENSIVE_CHECKS = 0
290 @ENABLE_EXPENSIVE_CHECKS@
292 # When DEBUG_RUNTIME is enabled, the runtime libraries will retain debug
293 # symbols.
294 #DEBUG_RUNTIME = 1
295 @DEBUG_RUNTIME@
297 # When DEBUG_SYMBOLS is enabled, the compiler libraries will retain debug
298 # symbols.
299 #DEBUG_SYMBOLS = 1
300 @DEBUG_SYMBOLS@
302 # When KEEP_SYMBOLS is enabled, installed executables will never have their
303 # symbols stripped.
304 #KEEP_SYMBOLS = 1
305 @KEEP_SYMBOLS@
307 # The compiler flags to use for optimized builds.
308 OPTIMIZE_OPTION := @OPTIMIZE_OPTION@
310 # When ENABLE_PROFILING is enabled, the llvm source base is built with profile
311 # information to allow gprof to be used to get execution frequencies.
312 #ENABLE_PROFILING = 1
314 # When ENABLE_DOCS is disabled, docs/ will not be built.
315 ENABLE_DOCS = @ENABLE_DOCS@
317 # When ENABLE_DOXYGEN is enabled, the doxygen documentation will be built
318 ENABLE_DOXYGEN = @ENABLE_DOXYGEN@
320 # Do we want to enable threads?
321 ENABLE_THREADS := @LLVM_ENABLE_THREADS@
323 # Do we want to enable zlib?
324 ENABLE_ZLIB := @LLVM_ENABLE_ZLIB@
326 # Do we want to build with position independent code?
327 ENABLE_PIC := @ENABLE_PIC@
329 # Do we want to build a shared library and link the tools with it?
330 ENABLE_SHARED := @ENABLE_SHARED@
332 # Do we want to link the stdc++ into a shared library? (Cygming)
333 ENABLE_EMBED_STDCXX := @ENABLE_EMBED_STDCXX@
335 # Use -fvisibility-inlines-hidden?
336 ENABLE_VISIBILITY_INLINES_HIDDEN := @ENABLE_VISIBILITY_INLINES_HIDDEN@
338 # Do we want to allow timestamping information into builds?
339 ENABLE_TIMESTAMPS := @ENABLE_TIMESTAMPS@
341 # This option tells the Makefiles to produce verbose output.
342 # It essentially prints the commands that make is executing
343 #VERBOSE = 1
345 # Enable JIT for this platform
346 TARGET_HAS_JIT = @TARGET_HAS_JIT@
348 # Environment variable to set to change the runtime shared library search path.
349 SHLIBPATH_VAR = @SHLIBPATH_VAR@
351 # Shared library extension for host platform.
352 SHLIBEXT = @SHLIBEXT@
354 # Executable file extension for host platform.
355 EXEEXT = @EXEEXT@
357 # Things we just assume are "there"
358 ECHO := echo
360 # Get the options for causing archives to link all their content instead of
361 # just missing symbols, and the inverse of that. This is used for certain LLVM
362 # tools that permit loadable modules. It ensures that the LLVM symbols will be
363 # available to those loadable modules.
364 LINKALL := @LINKALL@
365 NOLINKALL := @NOLINKALL@
367 # Get the value of HUGE_VAL_SANITY which will be either "yes" or "no" depending
368 # on the check.
369 HUGE_VAL_SANITY = @HUGE_VAL_SANITY@
371 # Bindings that we should build
372 BINDINGS_TO_BUILD := @BINDINGS_TO_BUILD@
373 ALL_BINDINGS      := @ALL_BINDINGS@
374 OCAML_LIBDIR      := @OCAML_LIBDIR@
376 # When compiling under Mingw/Cygwin, executables such as tblgen
377 # expect Windows paths, whereas the build system uses Unix paths.
378 # The function SYSPATH transforms Unix paths into Windows paths.
379 ifneq (,$(findstring -mno-cygwin, $(CXX)))
380   SYSPATH = $(shell echo $(1) | cygpath -m -f -)
381 else
382   SYSPATH = $(1)
383 endif
385 # Location of the plugin header file for gold.
386 BINUTILS_INCDIR := @BINUTILS_INCDIR@
388 # Optional flags supported by the compiler
389 # -Wno-missing-field-initializers
390 NO_MISSING_FIELD_INITIALIZERS = @NO_MISSING_FIELD_INITIALIZERS@
391 # -Wno-variadic-macros
392 NO_VARIADIC_MACROS = @NO_VARIADIC_MACROS@
393 # -Wcovered-switch-default
394 COVERED_SWITCH_DEFAULT = @COVERED_SWITCH_DEFAULT@
395 # -Wno-uninitialized
396 NO_UNINITIALIZED = @NO_UNINITIALIZED@
397 # -Wno-maybe-uninitialized
398 NO_MAYBE_UNINITIALIZED = @NO_MAYBE_UNINITIALIZED@
400 # Was polly found in tools/polly?
401 LLVM_HAS_POLLY = @LLVM_HAS_POLLY@
402 # Flags supported by the linker.
403 # bfd ld / gold --version-script=file
404 HAVE_LINK_VERSION_SCRIPT = @HAVE_LINK_VERSION_SCRIPT@
406 # Flags to control using libxml2
407 LIBXML2_LIBS := @LIBXML2_LIBS@
408 LIBXML2_INC  := @LIBXML2_INC@
410 # Flags to control building support for Intel JIT Events API
411 USE_INTEL_JITEVENTS := @USE_INTEL_JITEVENTS@
412 INTEL_JITEVENTS_INCDIR := @INTEL_JITEVENTS_INCDIR@
413 INTEL_JITEVENTS_LIBDIR := @INTEL_JITEVENTS_LIBDIR@
415 # Flags to control building support for OProfile JIT API
416 USE_OPROFILE := @USE_OPROFILE@
418 ifeq ($(USE_INTEL_JITEVENTS), 1)
419   OPTIONAL_COMPONENTS += IntelJITEvents
420 endif
421 ifeq ($(USE_OPROFILE), 1)
422   OPTIONAL_COMPONENTS += OProfileJIT
423 endif