/3rd_party/llvm/Makefile.config.in

https://code.google.com/p/softart/ · Autoconf · 408 lines · 182 code · 82 blank · 144 comment · 0 complexity · 7f7ee9b290db1d420efdaba17d60ab88 MD5 · raw file

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