aboutsummaryrefslogtreecommitdiff
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
commit797faed186a0a3c4e0e080923e96c1f58d63a672 (patch)
treeb427355d1217870582509c192d7b42cae67666ca
parent9851567a106ef1907cca715fc5e3e4e498b2df81 (diff)
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
-rw-r--r--Makefile.rules21
-rw-r--r--docs/MakefileGuide.html4
2 files changed, 25 insertions, 0 deletions
diff --git a/Makefile.rules b/Makefile.rules
index 215df8628c..649f8038bb 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)]:
diff --git a/docs/MakefileGuide.html b/docs/MakefileGuide.html
index a9c0725f21..b1f8292831 100644
--- a/docs/MakefileGuide.html
+++ b/docs/MakefileGuide.html
@@ -818,6 +818,10 @@
<tt>mklib</tt> by the <tt>configure</tt> script and always located in the
<dt><a name="LLVMAS"><tt>LLVMAS</tt></a><small>(defaulted)</small></dt>
<dd>Specifies the path to the <tt>llvm-as</tt> tool.</dd>
+ <dt><a name="LLVMCC"><tt>LLVMCC</tt></a></dt>
+ <dd>Specifies the path to the LLVM capable compiler.</dd>
+ <dt><a name="LLVMCXX"><tt>LLVMCXX</tt></a></dt>
+ <dd>Specifies the path to the LLVM C++ capable compiler.</dd>
<dt><a name="LLVMGCC"><tt>LLVMGCC</tt></a><small>(defaulted)</small></dt>
<dd>Specifies the path to the LLVM version of the GCC 'C' Compiler</dd>
<dt><a name="LLVMGXX"><tt>LLVMGXX</tt></a><small>(defaulted)</small></dt>