diff options
Diffstat (limited to 'tools/driver/Makefile')
-rw-r--r-- | tools/driver/Makefile | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/tools/driver/Makefile b/tools/driver/Makefile index b049af6..447f0e4 100644 --- a/tools/driver/Makefile +++ b/tools/driver/Makefile @@ -17,6 +17,9 @@ else endif endif +# Include tool version information on OS X. +TOOL_INFO_PLIST := Info.plist + # Include this here so we can get the configuration of the targets that have # been configured for construction. We have to do this early so we can set up # LINK_COMPONENTS before including Makefile.rules @@ -24,12 +27,36 @@ include $(CLANG_LEVEL)/../../Makefile.config LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader bitwriter codegen \ ipo selectiondag -USEDLIBS = clangFrontend.a clangDriver.a clangCodeGen.a clangSema.a \ - clangChecker.a clangAnalysis.a clangRewrite.a clangAST.a \ - clangParse.a clangLex.a clangBasic.a +USEDLIBS = clangFrontendTool.a clangFrontend.a clangDriver.a \ + clangSerialization.a clangCodeGen.a clangParse.a clangSema.a \ + clangChecker.a clangAnalysis.a clangIndex.a clangRewrite.a \ + clangAST.a clangLex.a clangBasic.a include $(CLANG_LEVEL)/Makefile +# Set the tool version information values. +ifeq ($(HOST_OS),Darwin) +ifdef CLANG_VENDOR +TOOL_INFO_NAME := $(CLANG_VENDOR) clang +else +TOOL_INFO_NAME := clang +endif + +ifdef CLANG_VENDOR_UTI +TOOL_INFO_UTI := $(CLANG_VENDOR_UTI) +else +TOOL_INFO_UTI := org.llvm.clang +endif + +TOOL_INFO_VERSION := $(word 3,$(shell grep "CLANG_VERSION " \ + $(PROJ_OBJ_DIR)/$(CLANG_LEVEL)/include/clang/Basic/Version.inc)) +ifdef LLVM_SUBMIT_VERSION +TOOL_INFO_BUILD_VERSION := $(LLVM_SUBMIT_VERSION).$(LLVM_SUBMIT_SUBVERSION) +else +TOOL_INFO_BUILD_VERSION := +endif +endif + # Translate make variable to define when building a "production" clang. ifdef CLANG_IS_PRODUCTION CPP.Defines += -DCLANG_IS_PRODUCTION |