aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.rules
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-02-23 10:00:53 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-02-23 10:00:53 +0000
commitcb8f178b4ba47f198635a96f545756d6469ceef7 (patch)
treeb427355d1217870582509c192d7b42cae67666ca /Makefile.rules
parentf80d8f3ae793c32d0e340341fe92d92922aad4e1 (diff)
downloadexternal_llvm-cb8f178b4ba47f198635a96f545756d6469ceef7.zip
external_llvm-cb8f178b4ba47f198635a96f545756d6469ceef7.tar.gz
external_llvm-cb8f178b4ba47f198635a96f545756d6469ceef7.tar.bz2
Add LLVM{CC,CXX} make variables, which specify the configured path the LLVM
capable compilers (which could be llvm-gcc or clang). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96935 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Makefile.rules')
-rw-r--r--Makefile.rules21
1 files changed, 21 insertions, 0 deletions
diff --git a/Makefile.rules b/Makefile.rules
index 215df86..649f803 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -495,6 +495,27 @@ LLVMToolDir := $(LLVM_OBJ_ROOT)/$(BuildMode)/bin
LLVMExmplDir:= $(LLVM_OBJ_ROOT)/$(BuildMode)/examples
#--------------------------------------------------------------------
+# LLVM Capable Compiler
+#--------------------------------------------------------------------
+
+ifeq ($(LLVMCC_OPTION),llvm-gcc)
+ LLVMCC := $(LLVMGCC)
+ LLVMCXX := $(LLVMGXX)
+else
+ ifeq ($(LLVMCC_OPTION),clang)
+ ifneq ($(CLANGPATH),)
+ LLVMCC := $(CLANGPATH)
+ LLVMCXX := $(CLANGXXPATH)
+ else
+ ifeq ($(ENABLE_BUILT_CLANG),1)
+ LLVMCC := $(LLVMToolDir)/clang
+ LLVMCXX := $(LLVMToolDir)/clang++
+ endif
+ endif
+ endif
+endif
+
+#--------------------------------------------------------------------
# Full Paths To Compiled Tools and Utilities
#--------------------------------------------------------------------
EchoCmd = $(ECHO) llvm[$(MAKELEVEL)]: