2009-03-03 03:59:07 +08:00
|
|
|
##===- tools/driver/Makefile -------------------------------*- Makefile -*-===##
|
2009-12-12 06:20:12 +08:00
|
|
|
#
|
2009-03-03 03:59:07 +08:00
|
|
|
# The LLVM Compiler Infrastructure
|
|
|
|
#
|
|
|
|
# This file is distributed under the University of Illinois Open Source
|
|
|
|
# License. See LICENSE.TXT for details.
|
2009-12-12 06:20:12 +08:00
|
|
|
#
|
2009-03-03 03:59:07 +08:00
|
|
|
##===----------------------------------------------------------------------===##
|
2010-06-09 04:34:18 +08:00
|
|
|
CLANG_LEVEL := ../..
|
2009-03-03 03:59:07 +08:00
|
|
|
|
2009-03-24 11:07:05 +08:00
|
|
|
TOOLNAME = clang
|
2009-11-19 08:21:33 +08:00
|
|
|
TOOLALIAS = clang++
|
2009-03-03 03:59:07 +08:00
|
|
|
|
2010-09-11 05:42:03 +08:00
|
|
|
# We don't currently expect production Clang builds to be interested in
|
|
|
|
# plugins. This is important for startup performance.
|
|
|
|
ifdef CLANG_IS_PRODUCTION
|
|
|
|
TOOL_NO_EXPORTS := 1
|
|
|
|
endif
|
|
|
|
|
2010-09-16 08:42:38 +08:00
|
|
|
ifdef CLANG_ORDER_FILE
|
|
|
|
TOOL_ORDER_FILE := $(CLANG_ORDER_FILE)
|
|
|
|
endif
|
|
|
|
|
2010-07-16 03:33:44 +08:00
|
|
|
# Include tool version information on OS X.
|
|
|
|
TOOL_INFO_PLIST := Info.plist
|
|
|
|
|
2009-12-12 06:20:12 +08:00
|
|
|
# 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
|
2010-06-09 04:34:18 +08:00
|
|
|
include $(CLANG_LEVEL)/../../Makefile.config
|
2009-12-12 06:20:12 +08:00
|
|
|
|
2010-06-08 07:27:59 +08:00
|
|
|
LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader bitwriter codegen \
|
2013-06-15 01:17:23 +08:00
|
|
|
instrumentation ipo irreader linker selectiondag option
|
2010-08-24 08:31:22 +08:00
|
|
|
USEDLIBS = clangFrontendTool.a clangFrontend.a clangDriver.a \
|
2012-12-14 00:09:42 +08:00
|
|
|
clangSerialization.a clangCodeGen.a clangParse.a clangSema.a
|
|
|
|
|
|
|
|
ifeq ($(ENABLE_CLANG_STATIC_ANALYZER),1)
|
|
|
|
USEDLIBS += clangStaticAnalyzerFrontend.a clangStaticAnalyzerCheckers.a \
|
|
|
|
clangStaticAnalyzerCore.a
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(ENABLE_CLANG_ARCMT),1)
|
|
|
|
USEDLIBS += clangARCMigrate.a
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(ENABLE_CLANG_REWRITER),1)
|
|
|
|
USEDLIBS += clangRewriteFrontend.a clangRewriteCore.a
|
|
|
|
endif
|
|
|
|
|
|
|
|
USEDLIBS += clangAnalysis.a clangEdit.a clangAST.a clangBasic.a clangLex.a
|
2009-03-03 03:59:07 +08:00
|
|
|
|
2010-06-09 04:34:18 +08:00
|
|
|
include $(CLANG_LEVEL)/Makefile
|
2009-09-23 06:31:13 +08:00
|
|
|
|
2010-07-16 03:33:44 +08:00
|
|
|
# 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
|