Misha Brukman | 6d5ab86 | 2004-04-24 00:10:56 +0000 | [diff] [blame] | 1 | #===-- Makefile.config - Local configuration for LLVM ------*- Makefile -*--===# |
| 2 | # |
| 3 | # The LLVM Compiler Infrastructure |
| 4 | # |
Chris Lattner | 57360d1 | 2007-12-29 20:11:13 +0000 | [diff] [blame] | 5 | # This file is distributed under the University of Illinois Open Source |
| 6 | # License. See LICENSE.TXT for details. |
Misha Brukman | 9b8f542 | 2009-01-09 16:44:42 +0000 | [diff] [blame] | 7 | # |
Misha Brukman | 6d5ab86 | 2004-04-24 00:10:56 +0000 | [diff] [blame] | 8 | #===------------------------------------------------------------------------===# |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 9 | # |
| 10 | # This file is included by Makefile.common. It defines paths and other |
| 11 | # values specific to a particular installation of LLVM. |
Brian Gaeke | f1dd200 | 2004-01-16 21:31:34 +0000 | [diff] [blame] | 12 | # |
Misha Brukman | 6d5ab86 | 2004-04-24 00:10:56 +0000 | [diff] [blame] | 13 | #===------------------------------------------------------------------------===# |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 14 | |
Reid Spencer | b2cb486 | 2005-01-16 02:20:42 +0000 | [diff] [blame] | 15 | # Define LLVM specific info and directories based on the autoconf variables |
Dylan Noblesmith | 7fe0e03 | 2011-12-18 18:50:16 +0000 | [diff] [blame] | 16 | LLVMPackageName := @PACKAGE_TARNAME@ |
Reid Spencer | b2cb486 | 2005-01-16 02:20:42 +0000 | [diff] [blame] | 17 | LLVMVersion := @PACKAGE_VERSION@ |
Stephen Hines | 36b5688 | 2014-04-23 16:57:46 -0700 | [diff] [blame] | 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@ |
Reid Spencer | e120021 | 2004-11-29 04:53:50 +0000 | [diff] [blame] | 22 | LLVM_CONFIGTIME := @LLVM_CONFIGTIME@ |
Reid Spencer | b2cb486 | 2005-01-16 02:20:42 +0000 | [diff] [blame] | 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 | |
Reid Spencer | aea7fe4 | 2006-07-28 05:05:00 +0000 | [diff] [blame] | 40 | PWD := @BINPWD@ |
Reid Spencer | b2cb486 | 2005-01-16 02:20:42 +0000 | [diff] [blame] | 41 | # Set the project name to LLVM if its not defined |
| 42 | ifndef PROJECT_NAME |
Reid Spencer | 1b22fde | 2006-08-07 23:23:39 +0000 | [diff] [blame] | 43 | PROJECT_NAME := $(LLVMPackageName) |
Reid Spencer | b2cb486 | 2005-01-16 02:20:42 +0000 | [diff] [blame] | 44 | endif |
| 45 | |
Chris Lattner | 7cf8fc7 | 2010-08-03 22:53:22 +0000 | [diff] [blame] | 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)) |
Reid Spencer | b2cb486 | 2005-01-16 02:20:42 +0000 | [diff] [blame] | 52 | |
NAKAMURA Takumi | e5ab51d | 2011-10-16 02:54:26 +0000 | [diff] [blame] | 53 | CLANG_SRC_ROOT := @CLANG_SRC_ROOT@ |
| 54 | |
Dylan Noblesmith | 7fe0e03 | 2011-12-18 18:50:16 +0000 | [diff] [blame] | 55 | ifeq ($(PROJECT_NAME),$(LLVMPackageName)) |
Chris Lattner | 7cf8fc7 | 2010-08-03 22:53:22 +0000 | [diff] [blame] | 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) |
NAKAMURA Takumi | e5ab51d | 2011-10-16 02:54:26 +0000 | [diff] [blame] | 59 | PROJ_SRC_DIR := $(LLVM_SRC_ROOT)$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR)) |
| 60 | |
| 61 | ifneq ($(CLANG_SRC_ROOT),) |
| 62 | CLANG_SRC_ROOT:= $(call realpath, $(CLANG_SRC_ROOT)) |
| 63 | PROJ_SRC_DIR := $(patsubst $(LLVM_SRC_ROOT)/tools/clang%,$(CLANG_SRC_ROOT)%,$(PROJ_SRC_DIR)) |
| 64 | endif |
| 65 | |
Reid Spencer | 32b1691 | 2007-01-17 20:24:45 +0000 | [diff] [blame] | 66 | prefix := @prefix@ |
| 67 | PROJ_prefix := $(prefix) |
Jordan Rose | 9208052 | 2012-10-01 18:40:32 +0000 | [diff] [blame] | 68 | program_prefix := @program_prefix@ |
Reid Spencer | b2cb486 | 2005-01-16 02:20:42 +0000 | [diff] [blame] | 69 | PROJ_VERSION := $(LLVMVersion) |
| 70 | else |
| 71 | ifndef PROJ_SRC_ROOT |
| 72 | $(error Projects must define PROJ_SRC_ROOT) |
| 73 | endif |
| 74 | ifndef PROJ_OBJ_ROOT |
| 75 | $(error Projects must define PROJ_OBJ_ROOT) |
| 76 | endif |
| 77 | ifndef PROJ_INSTALL_ROOT |
| 78 | $(error Projects must define PROJ_INSTALL_ROOT) |
| 79 | endif |
| 80 | ifndef LLVM_SRC_ROOT |
| 81 | $(error Projects must define LLVM_SRC_ROOT) |
| 82 | endif |
| 83 | ifndef LLVM_OBJ_ROOT |
| 84 | $(error Projects must define LLVM_OBJ_ROOT) |
| 85 | endif |
Chris Lattner | 7cf8fc7 | 2010-08-03 22:53:22 +0000 | [diff] [blame] | 86 | PROJ_SRC_DIR := $(call realpath, $(PROJ_SRC_ROOT)/$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR))) |
Reid Spencer | 32b1691 | 2007-01-17 20:24:45 +0000 | [diff] [blame] | 87 | prefix := $(PROJ_INSTALL_ROOT) |
| 88 | PROJ_prefix := $(prefix) |
Reid Spencer | b2cb486 | 2005-01-16 02:20:42 +0000 | [diff] [blame] | 89 | ifndef PROJ_VERSION |
| 90 | PROJ_VERSION := 1.0 |
| 91 | endif |
| 92 | endif |
Reid Spencer | e120021 | 2004-11-29 04:53:50 +0000 | [diff] [blame] | 93 | |
Bob Wilson | ae7e2a4 | 2011-11-28 07:59:52 +0000 | [diff] [blame] | 94 | INTERNAL_PREFIX := @INTERNAL_PREFIX@ |
| 95 | ifneq ($(INTERNAL_PREFIX),) |
| 96 | PROJ_internal_prefix := $(INTERNAL_PREFIX) |
| 97 | else |
| 98 | PROJ_internal_prefix := $(prefix) |
| 99 | endif |
| 100 | |
Erick Tryzelaar | d4076cf | 2010-03-04 20:56:19 +0000 | [diff] [blame] | 101 | PROJ_bindir := $(PROJ_prefix)/bin |
| 102 | PROJ_libdir := $(PROJ_prefix)/lib |
| 103 | PROJ_datadir := $(PROJ_prefix)/share |
| 104 | PROJ_docsdir := $(PROJ_prefix)/docs/llvm |
| 105 | PROJ_etcdir := $(PROJ_prefix)/etc/llvm |
| 106 | PROJ_includedir := $(PROJ_prefix)/include |
| 107 | PROJ_infodir := $(PROJ_prefix)/info |
| 108 | PROJ_mandir := $(PROJ_prefix)/share/man |
Reid Spencer | 32b1691 | 2007-01-17 20:24:45 +0000 | [diff] [blame] | 109 | |
Reid Spencer | bbf7a8a | 2004-12-31 22:54:28 +0000 | [diff] [blame] | 110 | # Determine if we're on a unix type operating system |
| 111 | LLVM_ON_UNIX:=@LLVM_ON_UNIX@ |
| 112 | LLVM_ON_WIN32:=@LLVM_ON_WIN32@ |
| 113 | |
Anton Korobeynikov | e55db74 | 2009-08-18 00:40:33 +0000 | [diff] [blame] | 114 | # Host operating system for which LLVM will be run. |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 115 | OS=@OS@ |
Anton Korobeynikov | e55db74 | 2009-08-18 00:40:33 +0000 | [diff] [blame] | 116 | HOST_OS=@HOST_OS@ |
| 117 | # Target operating system for which LLVM will compile for. |
| 118 | TARGET_OS=@TARGET_OS@ |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 119 | |
Danil Malyshev | bb8cef5 | 2012-05-17 21:07:47 +0000 | [diff] [blame] | 120 | # Host hardware architecture |
| 121 | HOST_ARCH=@HOST_ARCH@ |
John Criswell | 7659545 | 2003-07-01 22:07:39 +0000 | [diff] [blame] | 122 | # Target hardware architecture |
John Criswell | 7659545 | 2003-07-01 22:07:39 +0000 | [diff] [blame] | 123 | ARCH=@ARCH@ |
Daniel Dunbar | a7de1d6 | 2011-11-12 00:18:02 +0000 | [diff] [blame] | 124 | TARGET_NATIVE_ARCH := $(ARCH) |
Stephen Hines | 36b5688 | 2014-04-23 16:57:46 -0700 | [diff] [blame] | 125 | LLVM_NATIVE_ARCH := @LLVM_NATIVE_ARCH@ |
John Criswell | 7659545 | 2003-07-01 22:07:39 +0000 | [diff] [blame] | 126 | |
Reid Spencer | e2cfe5d | 2006-07-26 21:14:56 +0000 | [diff] [blame] | 127 | # Indicates, whether we're cross-compiling LLVM or not |
| 128 | LLVM_CROSS_COMPILING=@LLVM_CROSS_COMPILING@ |
| 129 | |
| 130 | # Executable file extension for build platform (mainly for |
| 131 | # tablegen call if we're cross-compiling). |
| 132 | BUILD_EXEEXT=@BUILD_EXEEXT@ |
| 133 | |
Jim Grosbach | 673612e | 2008-10-02 22:56:44 +0000 | [diff] [blame] | 134 | # Compilers for the build platflorm (mainly for tablegen |
| 135 | # call if we're cross-compiling). |
| 136 | BUILD_CC=@BUILD_CC@ |
| 137 | BUILD_CXX=@BUILD_CXX@ |
| 138 | |
Shantonu Sen | 5e869c3 | 2009-09-02 23:52:23 +0000 | [diff] [blame] | 139 | # Triple for configuring build tools when cross-compiling |
| 140 | BUILD_TRIPLE=@build@ |
| 141 | |
Peter Collingbourne | fbb662f | 2013-01-16 17:27:22 +0000 | [diff] [blame] | 142 | # Target triple (cpu-vendor-os) which LLVM is compiled for |
| 143 | HOST_TRIPLE=@host@ |
| 144 | |
Reid Spencer | 1822403 | 2004-11-07 19:12:53 +0000 | [diff] [blame] | 145 | # Target triple (cpu-vendor-os) for which we should generate code |
| 146 | TARGET_TRIPLE=@target@ |
| 147 | |
Evan Cheng | cf9be26 | 2006-06-20 22:16:32 +0000 | [diff] [blame] | 148 | # Extra options to compile LLVM with |
| 149 | EXTRA_OPTIONS=@EXTRA_OPTIONS@ |
| 150 | |
Daniel Dunbar | e2a91a7 | 2011-06-16 22:30:38 +0000 | [diff] [blame] | 151 | # Extra options to link LLVM with |
| 152 | EXTRA_LD_OPTIONS=@EXTRA_LD_OPTIONS@ |
| 153 | |
John Criswell | 0021c31 | 2004-02-13 21:57:29 +0000 | [diff] [blame] | 154 | # Endian-ness of the target |
| 155 | ENDIAN=@ENDIAN@ |
| 156 | |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 157 | # Path to the C++ compiler to use. This is an optional setting, which defaults |
| 158 | # to whatever your gmake defaults to. |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 159 | CXX = @CXX@ |
| 160 | |
Misha Brukman | b5a2e40 | 2004-06-17 15:39:58 +0000 | [diff] [blame] | 161 | # Path to the CC binary, which use used by testcases for native builds. |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 162 | CC := @CC@ |
| 163 | |
Patrik Hagglund | 6c440fc | 2013-02-04 08:15:53 +0000 | [diff] [blame] | 164 | # C/C++ preprocessor flags. |
| 165 | CPPFLAGS += @CPPFLAGS@ |
| 166 | |
| 167 | # C compiler flags. |
| 168 | CFLAGS += @CFLAGS@ |
| 169 | |
| 170 | # C++ compiler flags. |
| 171 | CXXFLAGS += @CXXFLAGS@ |
| 172 | |
Brian Gaeke | f1dd200 | 2004-01-16 21:31:34 +0000 | [diff] [blame] | 173 | # Linker flags. |
Patrik Hagglund | 6c440fc | 2013-02-04 08:15:53 +0000 | [diff] [blame] | 174 | LDFLAGS += @LDFLAGS@ |
John Criswell | 49bf862 | 2003-06-30 22:33:53 +0000 | [diff] [blame] | 175 | |
Brian Gaeke | f1dd200 | 2004-01-16 21:31:34 +0000 | [diff] [blame] | 176 | # Path to the library archiver program. |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 177 | AR_PATH = @AR@ |
Anton Korobeynikov | e55db74 | 2009-08-18 00:40:33 +0000 | [diff] [blame] | 178 | AR = @AR@ |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 179 | |
Reid Spencer | 1bc6864 | 2006-07-27 23:00:30 +0000 | [diff] [blame] | 180 | # Path to the nm program |
| 181 | NM_PATH = @NM@ |
| 182 | |
Reid Spencer | 151f8ba | 2004-10-25 08:27:37 +0000 | [diff] [blame] | 183 | # The pathnames of the programs we require to build |
Reid Spencer | 8a2d471 | 2004-12-16 17:48:14 +0000 | [diff] [blame] | 184 | CMP := @CMP@ |
| 185 | CP := @CP@ |
Reid Spencer | e120021 | 2004-11-29 04:53:50 +0000 | [diff] [blame] | 186 | DATE := @DATE@ |
| 187 | FIND := @FIND@ |
Reid Spencer | e120021 | 2004-11-29 04:53:50 +0000 | [diff] [blame] | 188 | GREP := @GREP@ |
| 189 | INSTALL := @INSTALL@ |
Reid Spencer | b2cb486 | 2005-01-16 02:20:42 +0000 | [diff] [blame] | 190 | MKDIR := $(LLVM_SRC_ROOT)/autoconf/mkinstalldirs |
Reid Spencer | e120021 | 2004-11-29 04:53:50 +0000 | [diff] [blame] | 191 | MV := @MV@ |
Reid Spencer | e120021 | 2004-11-29 04:53:50 +0000 | [diff] [blame] | 192 | RANLIB := @RANLIB@ |
| 193 | RM := @RM@ |
| 194 | SED := @SED@ |
| 195 | TAR := @TAR@ |
Saleem Abdulrasool | 3ef8b0a | 2013-01-30 04:07:37 +0000 | [diff] [blame] | 196 | PYTHON := @PYTHON@ |
Reid Spencer | e120021 | 2004-11-29 04:53:50 +0000 | [diff] [blame] | 197 | |
| 198 | # Paths to miscellaneous programs we hope are present but might not be |
| 199 | BZIP2 := @BZIP2@ |
mike-m | 68cb319 | 2010-05-06 23:45:43 +0000 | [diff] [blame] | 200 | CAT := @CAT@ |
Reid Spencer | e120021 | 2004-11-29 04:53:50 +0000 | [diff] [blame] | 201 | DOT := @DOT@ |
| 202 | DOXYGEN := @DOXYGEN@ |
Reid Spencer | e120021 | 2004-11-29 04:53:50 +0000 | [diff] [blame] | 203 | GROFF := @GROFF@ |
Eric Christopher | 031d307 | 2010-12-10 01:31:51 +0000 | [diff] [blame] | 204 | GZIPBIN := @GZIPBIN@ |
Stephen Hines | 37ed9c1 | 2014-12-01 14:51:49 -0800 | [diff] [blame] | 205 | GO := @GO@ |
| 206 | OCAMLFIND := @OCAMLFIND@ |
Duncan Sands | 3a67f50 | 2008-10-22 09:42:14 +0000 | [diff] [blame] | 207 | GAS := @GAS@ |
Reid Spencer | e120021 | 2004-11-29 04:53:50 +0000 | [diff] [blame] | 208 | POD2HTML := @POD2HTML@ |
| 209 | POD2MAN := @POD2MAN@ |
mike-m | 68cb319 | 2010-05-06 23:45:43 +0000 | [diff] [blame] | 210 | PDFROFF := @PDFROFF@ |
Reid Spencer | e120021 | 2004-11-29 04:53:50 +0000 | [diff] [blame] | 211 | ZIP := @ZIP@ |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 212 | |
Stephen Hines | 36b5688 | 2014-04-23 16:57:46 -0700 | [diff] [blame] | 213 | HAVE_LIBZ := @HAVE_LIBZ@ |
| 214 | HAVE_DLOPEN := @HAVE_DLOPEN@ |
Reid Spencer | 1000b73 | 2006-12-01 00:37:14 +0000 | [diff] [blame] | 215 | HAVE_PTHREAD := @HAVE_PTHREAD@ |
Stephen Hines | 36b5688 | 2014-04-23 16:57:46 -0700 | [diff] [blame] | 216 | HAVE_TERMINFO := @HAVE_TERMINFO@ |
Reid Spencer | b195d9d | 2006-03-23 23:21:29 +0000 | [diff] [blame] | 217 | |
Stephen Hines | 37ed9c1 | 2014-12-01 14:51:49 -0800 | [diff] [blame] | 218 | HAVE_OCAMLOPT := @HAVE_OCAMLOPT@ |
| 219 | HAVE_OCAML_OUNIT := @HAVE_OCAML_OUNIT@ |
| 220 | |
Reid Spencer | 5a87044 | 2005-04-22 17:14:14 +0000 | [diff] [blame] | 221 | LIBS := @LIBS@ |
| 222 | |
Stephen Hines | 36b5688 | 2014-04-23 16:57:46 -0700 | [diff] [blame] | 223 | # Targets that are possible to build |
| 224 | ALL_TARGETS := @ALL_TARGETS@ |
| 225 | |
Gordon Henriksen | 6530e9d | 2007-10-02 09:50:18 +0000 | [diff] [blame] | 226 | # Targets that we should build |
| 227 | TARGETS_TO_BUILD=@TARGETS_TO_BUILD@ |
| 228 | |
Stephen Hines | 36b5688 | 2014-04-23 16:57:46 -0700 | [diff] [blame] | 229 | # Targets supporting JIT |
| 230 | TARGETS_WITH_JIT := @TARGETS_WITH_JIT@ |
| 231 | |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 232 | # Path to directory where object files should be stored during a build. |
| 233 | # Set OBJ_ROOT to "." if you do not want to use a separate place for |
| 234 | # object files. |
John Criswell | 7f33695 | 2003-09-06 14:44:17 +0000 | [diff] [blame] | 235 | OBJ_ROOT := . |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 236 | |
Nick Lewycky | 1dace48 | 2009-03-03 04:55:15 +0000 | [diff] [blame] | 237 | # What to pass as rpath flag to g++ |
| 238 | RPATH := @RPATH@ |
| 239 | |
Nick Lewycky | 18f9907 | 2009-03-05 08:20:21 +0000 | [diff] [blame] | 240 | # What to pass as -rdynamic flag to g++ |
| 241 | RDYNAMIC := @RDYNAMIC@ |
| 242 | |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 243 | # These are options that can either be enabled here, or can be enabled on the |
Brian Gaeke | f1dd200 | 2004-01-16 21:31:34 +0000 | [diff] [blame] | 244 | # make command line (ie, make ENABLE_PROFILING=1): |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 245 | |
Eric Christopher | bee515f | 2011-11-11 22:51:42 +0000 | [diff] [blame] | 246 | # When ENABLE_LIBCPP is enabled, LLVM uses libc++ by default to build. |
| 247 | #ENABLE_LIBCPP = 0 |
| 248 | ENABLE_LIBCPP = @ENABLE_LIBCPP@ |
| 249 | |
Stephen Hines | 36b5688 | 2014-04-23 16:57:46 -0700 | [diff] [blame] | 250 | # When ENABLE_CXX1Y is enabled, LLVM uses c++1y mode by default to build. |
| 251 | # Otherwise it uses the baseline c++11. |
| 252 | ENABLE_CXX1Y = @ENABLE_CXX1Y@ |
Eric Christopher | 8212002 | 2012-08-03 19:47:14 +0000 | [diff] [blame] | 253 | |
Eric Christopher | 1baa381 | 2013-06-25 01:12:25 +0000 | [diff] [blame] | 254 | # When ENABLE_SPLIT_DWARF is enabled, LLVM uses -gfission to build in debug mode. |
| 255 | ENABLE_SPLIT_DWARF = @ENABLE_SPLIT_DWARF@ |
| 256 | |
Stephen Hines | 36b5688 | 2014-04-23 16:57:46 -0700 | [diff] [blame] | 257 | # When enabled, clang will have plugin support. |
| 258 | CLANG_PLUGIN_SUPPORT = @CLANG_PLUGIN_SUPPORT@ |
| 259 | |
Roman Divacky | d14baf4 | 2012-12-13 16:07:19 +0000 | [diff] [blame] | 260 | # When ENABLE_CLANG_ARCMT is enabled, clang will have ARCMigrationTool. |
| 261 | ENABLE_CLANG_ARCMT = @ENABLE_CLANG_ARCMT@ |
| 262 | |
Roman Divacky | d14baf4 | 2012-12-13 16:07:19 +0000 | [diff] [blame] | 263 | # When ENABLE_CLANG_STATIC_ANALYZER is enabled, clang will have StaticAnalyzer. |
| 264 | ENABLE_CLANG_STATIC_ANALYZER = @ENABLE_CLANG_STATIC_ANALYZER@ |
| 265 | |
Eric Christopher | 09a8873 | 2012-08-03 19:58:20 +0000 | [diff] [blame] | 266 | # When ENABLE_WERROR is enabled, we'll pass -Werror on the command line |
| 267 | ENABLE_WERROR = @ENABLE_WERROR@ |
| 268 | |
Stephen Hines | 36b5688 | 2014-04-23 16:57:46 -0700 | [diff] [blame] | 269 | # When ENABLE_TERMINFO is enabled, we use terminfo. |
| 270 | ENABLE_TERMINFO = @ENABLE_TERMINFO@ |
| 271 | |
Reid Spencer | c4329cf | 2006-04-07 15:59:41 +0000 | [diff] [blame] | 272 | # When ENABLE_OPTIMIZED is enabled, LLVM code is optimized and output is put |
Misha Brukman | 9b8f542 | 2009-01-09 16:44:42 +0000 | [diff] [blame] | 273 | # into the "Release" directories. Otherwise, LLVM code is not optimized and |
Reid Spencer | c4329cf | 2006-04-07 15:59:41 +0000 | [diff] [blame] | 274 | # output is put in the "Debug" directories. |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 275 | #ENABLE_OPTIMIZED = 1 |
| 276 | @ENABLE_OPTIMIZED@ |
| 277 | |
David Greene | dbefd0c | 2009-04-17 14:49:22 +0000 | [diff] [blame] | 278 | # When ENABLE_PROFILING is enabled, profile instrumentation is done |
| 279 | # and output is put into the "<Flavor>+Profile" directories, where |
Gabor Greif | 6418cb3 | 2010-07-07 13:58:46 +0000 | [diff] [blame] | 280 | # <Flavor> is either Debug or Release depending on how other build |
| 281 | # flags are set. Otherwise, output is put in the <Flavor> |
David Greene | dbefd0c | 2009-04-17 14:49:22 +0000 | [diff] [blame] | 282 | # directories. |
| 283 | #ENABLE_PROFILING = 1 |
| 284 | @ENABLE_PROFILING@ |
| 285 | |
Mikhail Glushenkov | 895f32c | 2009-07-03 03:52:07 +0000 | [diff] [blame] | 286 | # When DISABLE_ASSERTIONS is enabled, builds of all of the LLVM code will |
Reid Spencer | 1a5a551 | 2006-04-09 23:39:43 +0000 | [diff] [blame] | 287 | # exclude assertion checks, otherwise they are included. |
Reid Spencer | c28ccd8 | 2006-04-09 20:42:14 +0000 | [diff] [blame] | 288 | #DISABLE_ASSERTIONS = 1 |
| 289 | @DISABLE_ASSERTIONS@ |
Reid Spencer | c4329cf | 2006-04-07 15:59:41 +0000 | [diff] [blame] | 290 | |
David Greene | a696d24 | 2007-06-28 19:36:08 +0000 | [diff] [blame] | 291 | # When ENABLE_EXPENSIVE_CHECKS is enabled, builds of all of the LLVM |
| 292 | # code will include expensive checks, otherwise they are excluded. |
| 293 | #ENABLE_EXPENSIVE_CHECKS = 0 |
| 294 | @ENABLE_EXPENSIVE_CHECKS@ |
| 295 | |
Pirama Arumuga Nainar | 2c3e005 | 2015-05-06 11:46:36 -0700 | [diff] [blame] | 296 | # --enable-abi-breaking-checks : decide whether we should compile in asserts and |
| 297 | # checks that make the build ABI incompatible with an llvm built without these |
| 298 | # checks enabled. |
| 299 | ENABLE_ABI_BREAKING_CHECKS = @ENABLE_ABI_BREAKING_CHECKS@ |
| 300 | |
Reid Spencer | 8b2e141 | 2006-11-17 03:32:33 +0000 | [diff] [blame] | 301 | # When DEBUG_RUNTIME is enabled, the runtime libraries will retain debug |
| 302 | # symbols. |
| 303 | #DEBUG_RUNTIME = 1 |
| 304 | @DEBUG_RUNTIME@ |
| 305 | |
Jeffrey Yasskin | 7fd82e5 | 2009-09-27 17:47:29 +0000 | [diff] [blame] | 306 | # When DEBUG_SYMBOLS is enabled, the compiler libraries will retain debug |
| 307 | # symbols. |
| 308 | #DEBUG_SYMBOLS = 1 |
| 309 | @DEBUG_SYMBOLS@ |
| 310 | |
Daniel Dunbar | 8b5bee4 | 2012-08-14 18:14:20 +0000 | [diff] [blame] | 311 | # When KEEP_SYMBOLS is enabled, installed executables will never have their |
| 312 | # symbols stripped. |
| 313 | #KEEP_SYMBOLS = 1 |
| 314 | @KEEP_SYMBOLS@ |
| 315 | |
Daniel Dunbar | 1fce948 | 2009-11-04 04:32:50 +0000 | [diff] [blame] | 316 | # The compiler flags to use for optimized builds. |
| 317 | OPTIMIZE_OPTION := @OPTIMIZE_OPTION@ |
| 318 | |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 319 | # When ENABLE_PROFILING is enabled, the llvm source base is built with profile |
| 320 | # information to allow gprof to be used to get execution frequencies. |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 321 | #ENABLE_PROFILING = 1 |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 322 | |
Rafael Espindola | 9d9ae9f | 2010-11-12 19:24:06 +0000 | [diff] [blame] | 323 | # When ENABLE_DOCS is disabled, docs/ will not be built. |
| 324 | ENABLE_DOCS = @ENABLE_DOCS@ |
| 325 | |
Reid Spencer | e120021 | 2004-11-29 04:53:50 +0000 | [diff] [blame] | 326 | # When ENABLE_DOXYGEN is enabled, the doxygen documentation will be built |
| 327 | ENABLE_DOXYGEN = @ENABLE_DOXYGEN@ |
| 328 | |
Reid Spencer | b756c79 | 2006-06-01 01:09:43 +0000 | [diff] [blame] | 329 | # Do we want to enable threads? |
Saleem Abdulrasool | 11486ff | 2013-01-31 01:34:59 +0000 | [diff] [blame] | 330 | ENABLE_THREADS := @LLVM_ENABLE_THREADS@ |
Reid Spencer | b756c79 | 2006-06-01 01:09:43 +0000 | [diff] [blame] | 331 | |
Alexey Samsonov | ee03c94 | 2013-04-23 08:28:39 +0000 | [diff] [blame] | 332 | # Do we want to enable zlib? |
| 333 | ENABLE_ZLIB := @LLVM_ENABLE_ZLIB@ |
| 334 | |
Reid Spencer | 89b0d99 | 2006-12-16 22:07:52 +0000 | [diff] [blame] | 335 | # Do we want to build with position independent code? |
| 336 | ENABLE_PIC := @ENABLE_PIC@ |
| 337 | |
Jeffrey Yasskin | c901719 | 2010-02-25 06:34:33 +0000 | [diff] [blame] | 338 | # Do we want to build a shared library and link the tools with it? |
| 339 | ENABLE_SHARED := @ENABLE_SHARED@ |
| 340 | |
NAKAMURA Takumi | 8eac886 | 2010-12-29 03:59:14 +0000 | [diff] [blame] | 341 | # Do we want to link the stdc++ into a shared library? (Cygming) |
| 342 | ENABLE_EMBED_STDCXX := @ENABLE_EMBED_STDCXX@ |
| 343 | |
Daniel Dunbar | ecfe67c | 2008-09-02 17:35:16 +0000 | [diff] [blame] | 344 | # Use -fvisibility-inlines-hidden? |
| 345 | ENABLE_VISIBILITY_INLINES_HIDDEN := @ENABLE_VISIBILITY_INLINES_HIDDEN@ |
| 346 | |
Daniel Dunbar | dd464df | 2010-05-10 20:11:56 +0000 | [diff] [blame] | 347 | # Do we want to allow timestamping information into builds? |
| 348 | ENABLE_TIMESTAMPS := @ENABLE_TIMESTAMPS@ |
| 349 | |
Misha Brukman | e967650 | 2003-07-02 21:20:04 +0000 | [diff] [blame] | 350 | # This option tells the Makefiles to produce verbose output. |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 351 | # It essentially prints the commands that make is executing |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 352 | #VERBOSE = 1 |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 353 | |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 354 | # Enable JIT for this platform |
Reid Spencer | b195d9d | 2006-03-23 23:21:29 +0000 | [diff] [blame] | 355 | TARGET_HAS_JIT = @TARGET_HAS_JIT@ |
John Criswell | 7a73b80 | 2003-06-30 21:59:07 +0000 | [diff] [blame] | 356 | |
Reid Spencer | e2cfe5d | 2006-07-26 21:14:56 +0000 | [diff] [blame] | 357 | # Shared library extension for host platform. |
Brian Gaeke | 88aeace | 2004-01-21 19:39:07 +0000 | [diff] [blame] | 358 | SHLIBEXT = @SHLIBEXT@ |
| 359 | |
Reid Spencer | e2cfe5d | 2006-07-26 21:14:56 +0000 | [diff] [blame] | 360 | # Executable file extension for host platform. |
John Criswell | e6d468f | 2004-06-01 19:04:38 +0000 | [diff] [blame] | 361 | EXEEXT = @EXEEXT@ |
| 362 | |
Reid Spencer | b2cb486 | 2005-01-16 02:20:42 +0000 | [diff] [blame] | 363 | # Things we just assume are "there" |
| 364 | ECHO := echo |
Reid Spencer | a773bd5 | 2006-08-04 18:18:08 +0000 | [diff] [blame] | 365 | |
| 366 | # Get the options for causing archives to link all their content instead of |
| 367 | # just missing symbols, and the inverse of that. This is used for certain LLVM |
| 368 | # tools that permit loadable modules. It ensures that the LLVM symbols will be |
| 369 | # available to those loadable modules. |
| 370 | LINKALL := @LINKALL@ |
| 371 | NOLINKALL := @NOLINKALL@ |
Reid Spencer | b2ed0526 | 2006-11-03 18:04:08 +0000 | [diff] [blame] | 372 | |
| 373 | # Get the value of HUGE_VAL_SANITY which will be either "yes" or "no" depending |
| 374 | # on the check. |
| 375 | HUGE_VAL_SANITY = @HUGE_VAL_SANITY@ |
Gordon Henriksen | 6530e9d | 2007-10-02 09:50:18 +0000 | [diff] [blame] | 376 | |
| 377 | # Bindings that we should build |
Gordon Henriksen | 1d4e078 | 2007-10-02 16:42:10 +0000 | [diff] [blame] | 378 | BINDINGS_TO_BUILD := @BINDINGS_TO_BUILD@ |
Gordon Henriksen | 1d4e078 | 2007-10-02 16:42:10 +0000 | [diff] [blame] | 379 | OCAML_LIBDIR := @OCAML_LIBDIR@ |
Gordon Henriksen | 6530e9d | 2007-10-02 09:50:18 +0000 | [diff] [blame] | 380 | |
Chris Lattner | 163974d | 2008-01-15 22:50:50 +0000 | [diff] [blame] | 381 | # When compiling under Mingw/Cygwin, executables such as tblgen |
| 382 | # expect Windows paths, whereas the build system uses Unix paths. |
| 383 | # The function SYSPATH transforms Unix paths into Windows paths. |
| 384 | ifneq (,$(findstring -mno-cygwin, $(CXX))) |
| 385 | SYSPATH = $(shell echo $(1) | cygpath -m -f -) |
| 386 | else |
| 387 | SYSPATH = $(1) |
| 388 | endif |
Nick Lewycky | e2be5d5 | 2009-02-03 07:10:08 +0000 | [diff] [blame] | 389 | |
| 390 | # Location of the plugin header file for gold. |
| 391 | BINUTILS_INCDIR := @BINUTILS_INCDIR@ |
Mikhail Glushenkov | 2373c99 | 2009-07-03 03:52:47 +0000 | [diff] [blame] | 392 | |
Julien Lerouge | 8039e03 | 2009-10-26 19:58:44 +0000 | [diff] [blame] | 393 | # Optional flags supported by the compiler |
| 394 | # -Wno-missing-field-initializers |
| 395 | NO_MISSING_FIELD_INITIALIZERS = @NO_MISSING_FIELD_INITIALIZERS@ |
| 396 | # -Wno-variadic-macros |
| 397 | NO_VARIADIC_MACROS = @NO_VARIADIC_MACROS@ |
Rafael Espindola | 9993a3a | 2012-02-28 23:32:06 +0000 | [diff] [blame] | 398 | # -Wcovered-switch-default |
| 399 | COVERED_SWITCH_DEFAULT = @COVERED_SWITCH_DEFAULT@ |
David Greene | d2f8216 | 2013-01-09 22:11:13 +0000 | [diff] [blame] | 400 | # -Wno-uninitialized |
| 401 | NO_UNINITIALIZED = @NO_UNINITIALIZED@ |
| 402 | # -Wno-maybe-uninitialized |
| 403 | NO_MAYBE_UNINITIALIZED = @NO_MAYBE_UNINITIALIZED@ |
Stephen Hines | 37ed9c1 | 2014-12-01 14:51:49 -0800 | [diff] [blame] | 404 | # -Wno-comment |
| 405 | NO_COMMENT = @NO_COMMENT@ |
Dan Gohman | e05f609 | 2010-04-16 22:58:15 +0000 | [diff] [blame] | 406 | |
Tobias Grosser | baaadb2 | 2010-10-30 00:54:26 +0000 | [diff] [blame] | 407 | # Was polly found in tools/polly? |
| 408 | LLVM_HAS_POLLY = @LLVM_HAS_POLLY@ |
Dan Gohman | e05f609 | 2010-04-16 22:58:15 +0000 | [diff] [blame] | 409 | # Flags supported by the linker. |
Dan Gohman | da612d6 | 2010-06-01 14:56:56 +0000 | [diff] [blame] | 410 | # bfd ld / gold --version-script=file |
| 411 | HAVE_LINK_VERSION_SCRIPT = @HAVE_LINK_VERSION_SCRIPT@ |
Eli Bendersky | 61b1851 | 2012-03-13 08:33:15 +0000 | [diff] [blame] | 412 | |
Eric Christopher | 46e6bcf | 2012-08-03 19:47:19 +0000 | [diff] [blame] | 413 | # Flags to control using libxml2 |
| 414 | LIBXML2_LIBS := @LIBXML2_LIBS@ |
| 415 | LIBXML2_INC := @LIBXML2_INC@ |
| 416 | |
Eli Bendersky | 61b1851 | 2012-03-13 08:33:15 +0000 | [diff] [blame] | 417 | # Flags to control building support for Intel JIT Events API |
| 418 | USE_INTEL_JITEVENTS := @USE_INTEL_JITEVENTS@ |
| 419 | INTEL_JITEVENTS_INCDIR := @INTEL_JITEVENTS_INCDIR@ |
| 420 | INTEL_JITEVENTS_LIBDIR := @INTEL_JITEVENTS_LIBDIR@ |
| 421 | |
| 422 | # Flags to control building support for OProfile JIT API |
| 423 | USE_OPROFILE := @USE_OPROFILE@ |
Preston Gurd | 7549354 | 2012-05-07 19:38:40 +0000 | [diff] [blame] | 424 | |
| 425 | ifeq ($(USE_INTEL_JITEVENTS), 1) |
| 426 | OPTIONAL_COMPONENTS += IntelJITEvents |
| 427 | endif |
| 428 | ifeq ($(USE_OPROFILE), 1) |
| 429 | OPTIONAL_COMPONENTS += OProfileJIT |
| 430 | endif |