forked from speziale-ettore/OpenCRun
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.config.in
45 lines (35 loc) · 1.32 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
# Project info.
PROJECT_NAME := opencrun
PROJ_VERSION := 0.1
# 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 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@
# Temporary hack to let building bit-code modules.
LLVMCC_OPTION := clang
LLVMCC_EMITIR_FLAG := -emit-llvm
CLANGPATH := clang
# Add hwloc headers and library to preprocessor and linker search paths.
CPPFLAGS += @HWLOC_CFLAGS@
LDFLAGS += @HWLOC_LIBS@
# Force all processor extensions (otherwise they would not be activated by
# default for i386 builds)
CFLAGS += -march=native
CXXFLAGS += -march=native
# Link Time Optimizations (LTO)
ENABLE_LTO := @ENABLE_LTO@
ifeq (${ENABLE_LTO}, yes)
GCCPATH := $(shell gcc -print-search-dirs | awk '/install/{print $$2}')
AR := @GCC_AR@
RANLIB := @GCC_RANLIB@
CFLAGS := $(CFLAGS) -flto
CXXFLAGS := $(CXXFLAGS) -flto
LDFLAGS := $(LDFLAGS) -flto=`nproc` -march=native -Ofast
endif