16
Makefile
16
Makefile
@@ -51,7 +51,17 @@ else
|
|||||||
endif
|
endif
|
||||||
ARCH_TYPE = $(shell arch)
|
ARCH_TYPE = $(shell arch)
|
||||||
|
|
||||||
LLVM_LIBS=$(shell $(LLVM_CONFIG) --libs engine ipo bitreader bitwriter instrumentation linker)
|
LLVM_CXXFLAGS=$(shell $(LLVM_CONFIG) --cppflags)
|
||||||
|
LLVM_VERSION=LLVM_$(shell $(LLVM_CONFIG) --version | sed -e s/\\./_/ -e s/svn//)
|
||||||
|
LLVM_VERSION_DEF=-D$(LLVM_VERSION)
|
||||||
|
|
||||||
|
LLVM_COMPONENTS = engine ipo bitreader bitwriter instrumentation linker
|
||||||
|
# Component "option" was introduced in 3.3 and starting with 3.4 it is required for the link step.
|
||||||
|
# We check if it's available before adding it (to not break 3.2 and earlier).
|
||||||
|
ifeq ($(shell $(LLVM_CONFIG) --components |grep -c option), 1)
|
||||||
|
LLVM_COMPONENTS+=option
|
||||||
|
endif
|
||||||
|
LLVM_LIBS=$(shell $(LLVM_CONFIG) --libs $(LLVM_COMPONENTS))
|
||||||
|
|
||||||
CLANG=clang
|
CLANG=clang
|
||||||
CLANG_LIBS = -lclangFrontend -lclangDriver \
|
CLANG_LIBS = -lclangFrontend -lclangDriver \
|
||||||
@@ -70,10 +80,6 @@ ifeq ($(ARCH_OS2),Msys)
|
|||||||
ISPC_LIBS += -lshlwapi -limagehlp -lpsapi
|
ISPC_LIBS += -lshlwapi -limagehlp -lpsapi
|
||||||
endif
|
endif
|
||||||
|
|
||||||
LLVM_CXXFLAGS=$(shell $(LLVM_CONFIG) --cppflags)
|
|
||||||
LLVM_VERSION=LLVM_$(shell $(LLVM_CONFIG) --version | sed -e s/\\./_/ -e s/svn//)
|
|
||||||
LLVM_VERSION_DEF=-D$(LLVM_VERSION)
|
|
||||||
|
|
||||||
# Define build time stamp and revision.
|
# Define build time stamp and revision.
|
||||||
# For revision we use GIT or SVN info.
|
# For revision we use GIT or SVN info.
|
||||||
BUILD_DATE=$(shell date +%Y%m%d)
|
BUILD_DATE=$(shell date +%Y%m%d)
|
||||||
|
|||||||
@@ -2188,7 +2188,11 @@ bool CWriter::doInitialization(llvm::Module &M) {
|
|||||||
#endif
|
#endif
|
||||||
TAsm = new CBEMCAsmInfo();
|
TAsm = new CBEMCAsmInfo();
|
||||||
MRI = new llvm::MCRegisterInfo();
|
MRI = new llvm::MCRegisterInfo();
|
||||||
|
#if defined(LLVM_3_4)
|
||||||
|
TCtx = new llvm::MCContext(TAsm, MRI, NULL);
|
||||||
|
#else
|
||||||
TCtx = new llvm::MCContext(*TAsm, *MRI, NULL);
|
TCtx = new llvm::MCContext(*TAsm, *MRI, NULL);
|
||||||
|
#endif
|
||||||
//Mang = new llvm::Mangler(*TCtx, *TD);
|
//Mang = new llvm::Mangler(*TCtx, *TD);
|
||||||
|
|
||||||
// Keep track of which functions are static ctors/dtors so they can have
|
// Keep track of which functions are static ctors/dtors so they can have
|
||||||
|
|||||||
Reference in New Issue
Block a user