1 ##===- tools/driver/Makefile -------------------------------*- Makefile -*-===##
3 # The LLVM Compiler Infrastructure
5 # This file is distributed under the University of Illinois Open Source
6 # License. See LICENSE.TXT for details.
8 ##===----------------------------------------------------------------------===##
14 # We don't currently expect production Clang builds to be interested in
15 # plugins. This is important for startup performance.
16 ifdef CLANG_IS_PRODUCTION
20 ifdef CLANG_ORDER_FILE
21 TOOL_ORDER_FILE := $(CLANG_ORDER_FILE)
24 # Include tool version information on OS X.
25 TOOL_INFO_PLIST := Info.plist
27 # Include this here so we can get the configuration of the targets that have
28 # been configured for construction. We have to do this early so we can set up
29 # LINK_COMPONENTS before including Makefile.rules
30 include $(CLANG_LEVEL)/../../Makefile.config
32 LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader bitwriter codegen \
33 instrumentation ipo irreader linker selectiondag option
34 USEDLIBS = clangFrontendTool.a clangFrontend.a clangDriver.a \
35 clangSerialization.a clangCodeGen.a clangParse.a clangSema.a
37 ifeq ($(ENABLE_CLANG_STATIC_ANALYZER),1)
38 USEDLIBS += clangStaticAnalyzerFrontend.a clangStaticAnalyzerCheckers.a \
39 clangStaticAnalyzerCore.a
42 ifeq ($(ENABLE_CLANG_ARCMT),1)
43 USEDLIBS += clangARCMigrate.a
46 ifeq ($(ENABLE_CLANG_REWRITER),1)
47 USEDLIBS += clangRewriteFrontend.a clangRewriteCore.a
50 USEDLIBS += clangAnalysis.a clangEdit.a clangAST.a clangBasic.a clangLex.a
52 include $(CLANG_LEVEL)/Makefile
54 # Set the tool version information values.
55 ifeq ($(HOST_OS),Darwin)
57 TOOL_INFO_NAME := $(CLANG_VENDOR) clang
59 TOOL_INFO_NAME := clang
62 ifdef CLANG_VENDOR_UTI
63 TOOL_INFO_UTI := $(CLANG_VENDOR_UTI)
65 TOOL_INFO_UTI := org.llvm.clang
68 TOOL_INFO_VERSION := $(word 3,$(shell grep "CLANG_VERSION " \
69 $(PROJ_OBJ_DIR)/$(CLANG_LEVEL)/include/clang/Basic/Version.inc))
70 ifdef LLVM_SUBMIT_VERSION
71 TOOL_INFO_BUILD_VERSION := $(LLVM_SUBMIT_VERSION).$(LLVM_SUBMIT_SUBVERSION)
73 TOOL_INFO_BUILD_VERSION :=