• 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
12ifndef CLANG_IS_PRODUCTION
13TOOLALIAS = clang++
14else
15  ifdef CLANGXX_IS_PRODUCTION
16    TOOLALIAS = clang++
17  endif
18endif
19
20# We don't currently expect production Clang builds to be interested in
21# plugins. This is important for startup performance.
22ifdef CLANG_IS_PRODUCTION
23TOOL_NO_EXPORTS := 1
24endif
25
26ifdef CLANG_ORDER_FILE
27TOOL_ORDER_FILE := $(CLANG_ORDER_FILE)
28endif
29
30# Include tool version information on OS X.
31TOOL_INFO_PLIST := Info.plist
32
33# Include this here so we can get the configuration of the targets that have
34# been configured for construction. We have to do this early so we can set up
35# LINK_COMPONENTS before including Makefile.rules
36include $(CLANG_LEVEL)/../../Makefile.config
37
38LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader bitwriter codegen \
39                   instrumentation ipo selectiondag
40USEDLIBS = clangFrontendTool.a clangFrontend.a clangDriver.a \
41           clangSerialization.a clangCodeGen.a clangParse.a clangSema.a \
42           clangStaticAnalyzerFrontend.a clangStaticAnalyzerCheckers.a \
43           clangStaticAnalyzerCore.a \
44           clangAnalysis.a clangIndex.a clangARCMigrate.a clangRewrite.a \
45           clangAST.a clangLex.a clangBasic.a
46
47include $(CLANG_LEVEL)/Makefile
48
49# Set the tool version information values.
50ifeq ($(HOST_OS),Darwin)
51ifdef CLANG_VENDOR
52TOOL_INFO_NAME := $(CLANG_VENDOR) clang
53else
54TOOL_INFO_NAME := clang
55endif
56
57ifdef CLANG_VENDOR_UTI
58TOOL_INFO_UTI := $(CLANG_VENDOR_UTI)
59else
60TOOL_INFO_UTI := org.llvm.clang
61endif
62
63TOOL_INFO_VERSION := $(word 3,$(shell grep "CLANG_VERSION " \
64	$(PROJ_OBJ_DIR)/$(CLANG_LEVEL)/include/clang/Basic/Version.inc))
65ifdef LLVM_SUBMIT_VERSION
66TOOL_INFO_BUILD_VERSION := $(LLVM_SUBMIT_VERSION).$(LLVM_SUBMIT_SUBVERSION)
67else
68TOOL_INFO_BUILD_VERSION :=
69endif
70endif
71
72# Translate make variable to define when building a "production" clang.
73ifdef CLANG_IS_PRODUCTION
74CPP.Defines += -DCLANG_IS_PRODUCTION
75endif
76ifdef CLANGXX_IS_PRODUCTION
77CPP.Defines += -DCLANGXX_IS_PRODUCTION
78endif
79