• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1##===- tools/driver/Makefile -------------------------------*- Makefile -*-===##
2#
3#                     The LLVM Compiler Infrastructure
4#
5# This file is distributed under the University of Illinois Open Source
6# License. See LICENSE.TXT for details.
7#
8##===----------------------------------------------------------------------===##
9CLANG_LEVEL := ../..
10
11TOOLNAME = clang
12TOOLALIAS = clang++
13
14# We don't currently expect production Clang builds to be interested in
15# plugins. This is important for startup performance.
16ifdef CLANG_IS_PRODUCTION
17TOOL_NO_EXPORTS := 1
18endif
19
20ifdef CLANG_ORDER_FILE
21TOOL_ORDER_FILE := $(CLANG_ORDER_FILE)
22endif
23
24# Include tool version information on OS X.
25TOOL_INFO_PLIST := Info.plist
26
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
30include $(CLANG_LEVEL)/../../Makefile.config
31
32LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader bitwriter codegen \
33                   instrumentation ipo linker selectiondag
34USEDLIBS = clangFrontendTool.a clangFrontend.a clangDriver.a \
35           clangSerialization.a clangCodeGen.a clangParse.a clangSema.a \
36           clangStaticAnalyzerFrontend.a clangStaticAnalyzerCheckers.a \
37           clangStaticAnalyzerCore.a \
38           clangAnalysis.a clangARCMigrate.a \
39           clangRewriteFrontend.a clangRewriteCore.a \
40           clangEdit.a clangAST.a clangLex.a clangBasic.a
41
42include $(CLANG_LEVEL)/Makefile
43
44# Set the tool version information values.
45ifeq ($(HOST_OS),Darwin)
46ifdef CLANG_VENDOR
47TOOL_INFO_NAME := $(CLANG_VENDOR) clang
48else
49TOOL_INFO_NAME := clang
50endif
51
52ifdef CLANG_VENDOR_UTI
53TOOL_INFO_UTI := $(CLANG_VENDOR_UTI)
54else
55TOOL_INFO_UTI := org.llvm.clang
56endif
57
58TOOL_INFO_VERSION := $(word 3,$(shell grep "CLANG_VERSION " \
59	$(PROJ_OBJ_DIR)/$(CLANG_LEVEL)/include/clang/Basic/Version.inc))
60ifdef LLVM_SUBMIT_VERSION
61TOOL_INFO_BUILD_VERSION := $(LLVM_SUBMIT_VERSION).$(LLVM_SUBMIT_SUBVERSION)
62else
63TOOL_INFO_BUILD_VERSION :=
64endif
65endif
66
67# Translate make variable to define when building a "production" clang.
68ifdef CLANG_IS_PRODUCTION
69CPP.Defines += -DCLANG_IS_PRODUCTION
70endif
71