mirror of
https://github.com/nasa/trick.git
synced 2025-01-22 04:18:09 +00:00
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:
parent
0bd8c2f09e
commit
489737d34c
@ -1 +1 @@
|
|||||||
current_version = "15.1.0"
|
current_version = "15.2.0"
|
||||||
|
3
configure
vendored
3
configure
vendored
@ -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 compiler" `$llvm/bin/$llvm_config --bindir`/clang
|
||||||
check_exists "clang header files" `$llvm/bin/$llvm_config --includedir`/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
|
if [ "$gtest" != "" ] ; then
|
||||||
check_exists "Google Test" "$gtest/include/gtest"
|
check_exists "Google Test" "$gtest/include/gtest"
|
||||||
|
@ -145,7 +145,11 @@ int main( int argc , char * argv[] ) {
|
|||||||
// Tell the preprocessor to use its default predefines
|
// Tell the preprocessor to use its default predefines
|
||||||
clang::PreprocessorOptions & ppo = ci.getPreprocessorOpts() ;
|
clang::PreprocessorOptions & ppo = ci.getPreprocessorOpts() ;
|
||||||
ppo.UsePredefines = true;
|
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());
|
pp.getBuiltinInfo().InitializeBuiltins(pp.getIdentifierTable(), pp.getLangOpts());
|
||||||
|
#endif
|
||||||
// Add all of the #define from the command line to the default predefines.
|
// Add all of the #define from the command line to the default predefines.
|
||||||
hsd.addDefines ( defines ) ;
|
hsd.addDefines ( defines ) ;
|
||||||
|
|
||||||
|
@ -2,21 +2,15 @@
|
|||||||
# The config_${HOST_TYPE}.mk file provides LLVM_HOME
|
# The config_${HOST_TYPE}.mk file provides LLVM_HOME
|
||||||
include ${TRICK_HOME}/makefiles/Makefile.common
|
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
|
CC := $(shell $(LLVM_HOME)/bin/$(LLVM_CONFIG) --bindir)/clang
|
||||||
CXX := $(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
|
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)
|
CLANG_MINOR_GTEQ5 := $(shell expr `$(LLVM_HOME)/bin/llvm-config --version | cut -f2 -d. ` \>= 5 )
|
||||||
endif
|
|
||||||
LLVMLDFLAGS := $(shell $(LLVM_HOME)/bin/$(LLVM_CONFIG) --ldflags)
|
|
||||||
OBJ_DIR := object_$(TRICK_HOST_CPU)
|
|
||||||
|
|
||||||
CLANG_VERSION := $(shell $(LLVM_HOME)/bin/$(LLVM_CONFIG) --version)
|
LLVMLDFLAGS := $(shell $(LLVM_HOME)/bin/llvm-config --ldflags)
|
||||||
CLANG_MINOR_GTEQ5 := $(shell expr `$(LLVM_HOME)/bin/$(LLVM_CONFIG) --version | cut -f2 -d. ` \>= 5 )
|
|
||||||
CLANG_LIBDIR := $(shell $(LLVM_HOME)/bin/$(LLVM_CONFIG) --libdir)
|
OBJ_DIR := object_$(TRICK_HOST_CPU)
|
||||||
|
|
||||||
ifeq ($(IS_CC_CLANG), 0)
|
ifeq ($(IS_CC_CLANG), 0)
|
||||||
CXXFLAGS += -DGCC_MAJOR=$(GCC_MAJOR) -DGCC_MINOR=$(GCC_MINOR)
|
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_INCLUDE = -I${TRICK_HOME}/trick_source/trick_utils/units/include
|
||||||
UNITS_CONV_OBJ = $(OBJ_DIR)/units_conv.o
|
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)
|
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
|
endif
|
||||||
|
|
||||||
ifeq ($(CLANG_VERSION),3.1)
|
ifeq ($(TRICK_HOST_TYPE),Darwin)
|
||||||
CLANGLIBS = \
|
CXXFLAGS += -std=c++11
|
||||||
-lclangFrontend \
|
CLANGLIBS += -lLLVMOption -lLLVMMCParser -lLLVMBitReader -lLLVMMC -lLLVMSupport $(shell $(LLVM_HOME)/bin/llvm-config --system-libs)
|
||||||
-lclangDriver \
|
CLANGLIBS += -lc++abi
|
||||||
-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)
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
all: $(ICG) lib/clang/$(LLVM_VERSION)
|
all: $(ICG)
|
||||||
|
|
||||||
$(ICG): $(OBJECTS) $(UNITS_CONV_OBJ)
|
$(ICG): $(OBJECTS) $(UNITS_CONV_OBJ)
|
||||||
$(CXX) -o $@ $(OBJECTS) $(UNITS_CONV_OBJ) $(LLVMLIBDIR) $(CLANGLIBS) $(LLVMLDFLAGS)
|
$(CXX) -o $@ $(OBJECTS) $(UNITS_CONV_OBJ) $(LLVMLDFLAGS) $(CLANGLIBS)
|
||||||
|
|
||||||
lib/clang:
|
|
||||||
mkdir -p $@
|
|
||||||
|
|
||||||
lib/clang/$(LLVM_VERSION): | lib/clang
|
|
||||||
cp -r $(CLANG_LIBDIR)/clang/$(LLVM_VERSION) lib/clang
|
|
||||||
|
|
||||||
# Only FieldDescription.cpp includes the units conversion header.
|
# Only FieldDescription.cpp includes the units conversion header.
|
||||||
$(OBJ_DIR)/FieldDescription.o : CXXFLAGS += $(UNITS_CONV_INCLUDE)
|
$(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)
|
$(OBJ_DIR)/main.o : CXXFLAGS += $(UNITS_CONV_INCLUDE)
|
||||||
|
|
||||||
$(OBJECTS): $(OBJ_DIR)/%.o : %.cpp
|
$(OBJECTS): $(OBJ_DIR)/%.o : %.cpp
|
||||||
@ -92,8 +74,5 @@ $(OBJECTS) $(UNITS_CONV_OBJ) : | $(OBJ_DIR)
|
|||||||
$(OBJ_DIR):
|
$(OBJ_DIR):
|
||||||
mkdir -p $(OBJ_DIR)
|
mkdir -p $(OBJ_DIR)
|
||||||
|
|
||||||
# if an LLVM_HOME is not specified, then ICG cannot be rebuilt... don't delete it
|
|
||||||
clean:
|
clean:
|
||||||
ifneq ($(LLVM_HOME),)
|
rm -rf $(OBJ_DIR) $(ICG)
|
||||||
-rm -rf $(OBJ_DIR) $(ICG) lib
|
|
||||||
endif
|
|
||||||
|
Loading…
Reference in New Issue
Block a user