Release 15.2.0

It's been a while since we tested 15.x on the mac.  The makefile
for ICG needed updating to what is essentially in 16.  Added the
one change required for clang 3.8.  Updated the version to 15.2.0
in trick_ver.txt.  Finally removed the check for libclang.a.  The
more recent clang releases are delivering libclang.dylib and I'm
too lazy to make big changes in the configure script to search
for it.  The header file check should be enough.

refs #228
This commit is contained in:
Alex Lin 2016-04-19 16:08:33 -05:00
parent 0bd8c2f09e
commit 489737d34c
4 changed files with 37 additions and 53 deletions

View File

@ -1 +1 @@
current_version = "15.1.0"
current_version = "15.2.0"

3
configure vendored
View File

@ -713,7 +713,8 @@ if [ -e "$TRICK_HOME/.git" -o $dev == 1 ] ; then
check_exists "clang compiler" `$llvm/bin/$llvm_config --bindir`/clang
check_exists "clang header files" `$llvm/bin/$llvm_config --includedir`/clang
check_exists "clang library" `$llvm/bin/$llvm_config --libdir`/libclang.a
# The newer clang releases on the mac have libclang.dylib
#check_exists "clang library" `$llvm/bin/$llvm_config --libdir`/libclang.a
if [ "$gtest" != "" ] ; then
check_exists "Google Test" "$gtest/include/gtest"

View File

@ -145,7 +145,11 @@ int main( int argc , char * argv[] ) {
// Tell the preprocessor to use its default predefines
clang::PreprocessorOptions & ppo = ci.getPreprocessorOpts() ;
ppo.UsePredefines = true;
#if (__clang_major__ == 3) && (__clang_minor__ >= 8)
pp.getBuiltinInfo().initializeBuiltins(pp.getIdentifierTable(), pp.getLangOpts());
#else
pp.getBuiltinInfo().InitializeBuiltins(pp.getIdentifierTable(), pp.getLangOpts());
#endif
// Add all of the #define from the command line to the default predefines.
hsd.addDefines ( defines ) ;

View File

@ -2,21 +2,15 @@
# The config_${HOST_TYPE}.mk file provides LLVM_HOME
include ${TRICK_HOME}/makefiles/Makefile.common
RTTIFLAG := -fno-rtti
LLVM_VERSION := $(shell $(LLVM_HOME)/bin/$(LLVM_CONFIG) --version)
ifneq ($(LLVM_HOME),)
CC := $(shell $(LLVM_HOME)/bin/$(LLVM_CONFIG) --bindir)/clang
CXX := $(shell $(LLVM_HOME)/bin/$(LLVM_CONFIG) --bindir)/clang++
CXXFLAGS := -g -I$(shell $(LLVM_HOME)/bin/llvm-config --includedir) -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fno-rtti
LLVMLIBDIR := -L$(shell $(LLVM_HOME)/bin/$(LLVM_CONFIG) --libdir)
endif
LLVMLDFLAGS := $(shell $(LLVM_HOME)/bin/$(LLVM_CONFIG) --ldflags)
OBJ_DIR := object_$(TRICK_HOST_CPU)
CLANG_MINOR_GTEQ5 := $(shell expr `$(LLVM_HOME)/bin/llvm-config --version | cut -f2 -d. ` \>= 5 )
CLANG_VERSION := $(shell $(LLVM_HOME)/bin/$(LLVM_CONFIG) --version)
CLANG_MINOR_GTEQ5 := $(shell expr `$(LLVM_HOME)/bin/$(LLVM_CONFIG) --version | cut -f2 -d. ` \>= 5 )
CLANG_LIBDIR := $(shell $(LLVM_HOME)/bin/$(LLVM_CONFIG) --libdir)
LLVMLDFLAGS := $(shell $(LLVM_HOME)/bin/llvm-config --ldflags)
OBJ_DIR := object_$(TRICK_HOST_CPU)
ifeq ($(IS_CC_CLANG), 0)
CXXFLAGS += -DGCC_MAJOR=$(GCC_MAJOR) -DGCC_MINOR=$(GCC_MINOR)
@ -32,53 +26,41 @@ UNITS_CONV_SRC = ${TRICK_HOME}/trick_source/trick_utils/units/src/units_conv.c
UNITS_CONV_INCLUDE = -I${TRICK_HOME}/trick_source/trick_utils/units/include
UNITS_CONV_OBJ = $(OBJ_DIR)/units_conv.o
CLANGLIBS = \
-lclangFrontend \
-lclangDriver \
-lclangSerialization \
-lclangParse \
-lclangSema \
-lclangAnalysis \
-lclangEdit \
-lclangAST \
-lclangLex \
-lclangBasic \
ifeq ($(TRICK_HOST_TYPE),Linux)
CLANGLIBS += $(shell $(LLVM_HOME)/bin/llvm-config --libs)
ifeq ($(CLANG_MINOR_GTEQ5),1)
LLVMLDFLAGS += $(shell $(LLVM_HOME)/bin/$(LLVM_CONFIG) --system-libs)
CXXFLAGS += -std=c++11
# Fedora 21 adds -ledit as a system lib, but it isn't installed, or required.
CLANGLIBS += $(filter-out -ledit,$(shell $(LLVM_HOME)/bin/llvm-config --system-libs))
endif
endif
ifeq ($(CLANG_VERSION),3.1)
CLANGLIBS = \
-lclangFrontend \
-lclangDriver \
-lclangSerialization \
-lclangParse \
-lclangSema \
-lclangAnalysis \
-lclangRewrite \
-lclangEdit \
-lclangAST \
-lclangLex \
-lclangBasic \
-lLLVMMC \
-lLLVMSupport
else
CLANGLIBS = \
-lclangFrontend \
-lclangDriver \
-lclangSerialization \
-lclangParse \
-lclangSema \
-lclangAnalysis \
-lclangEdit \
-lclangAST \
-lclangLex \
-lclangBasic \
$(shell $(LLVM_HOME)/bin/$(LLVM_CONFIG) --libs)
ifeq ($(TRICK_HOST_TYPE),Darwin)
CXXFLAGS += -std=c++11
CLANGLIBS += -lLLVMOption -lLLVMMCParser -lLLVMBitReader -lLLVMMC -lLLVMSupport $(shell $(LLVM_HOME)/bin/llvm-config --system-libs)
CLANGLIBS += -lc++abi
endif
all: $(ICG) lib/clang/$(LLVM_VERSION)
all: $(ICG)
$(ICG): $(OBJECTS) $(UNITS_CONV_OBJ)
$(CXX) -o $@ $(OBJECTS) $(UNITS_CONV_OBJ) $(LLVMLIBDIR) $(CLANGLIBS) $(LLVMLDFLAGS)
lib/clang:
mkdir -p $@
lib/clang/$(LLVM_VERSION): | lib/clang
cp -r $(CLANG_LIBDIR)/clang/$(LLVM_VERSION) lib/clang
$(CXX) -o $@ $(OBJECTS) $(UNITS_CONV_OBJ) $(LLVMLDFLAGS) $(CLANGLIBS)
# Only FieldDescription.cpp includes the units conversion header.
$(OBJ_DIR)/FieldDescription.o : CXXFLAGS += $(UNITS_CONV_INCLUDE)
$(OBJ_DIR)/HeaderSearchDirs.o : CXXFLAGS += -DLLVM_HOME=\"${LLVM_HOME}\"
$(OBJ_DIR)/main.o : CXXFLAGS += $(UNITS_CONV_INCLUDE)
$(OBJECTS): $(OBJ_DIR)/%.o : %.cpp
@ -92,8 +74,5 @@ $(OBJECTS) $(UNITS_CONV_OBJ) : | $(OBJ_DIR)
$(OBJ_DIR):
mkdir -p $(OBJ_DIR)
# if an LLVM_HOME is not specified, then ICG cannot be rebuilt... don't delete it
clean:
ifneq ($(LLVM_HOME),)
-rm -rf $(OBJ_DIR) $(ICG) lib
endif
rm -rf $(OBJ_DIR) $(ICG)