Add LLVM{CC,CXX} make variables, which specify the configured path the LLVM
authorDaniel Dunbar <daniel@zuster.org>
Tue, 23 Feb 2010 10:00:53 +0000 (10:00 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Tue, 23 Feb 2010 10:00:53 +0000 (10:00 +0000)
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

Makefile.rules
docs/MakefileGuide.html

index 215df8628c96438ecdaaa6f9822e988f02a224c9..649f8038bb60fac82c5af2a115f643e95390e2ba 100644 (file)
@@ -494,6 +494,27 @@ LLVMLibDir  := $(LLVM_OBJ_ROOT)/$(BuildMode)/lib
 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
 #--------------------------------------------------------------------
index a9c0725f215682cbc882a60a447be4014b80223d..b1f8292831ee1ffb883c221492e06970f0557aae 100644 (file)
     <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>