From 16a1353031cc949aa11ec5b0235260c2417e6092 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Tue, 23 Feb 2010 10:00:53 +0000 Subject: [PATCH] Add LLVM{CC,CXX} make variables, which specify the configured path the LLVM capable compilers (which could be llvm-gcc or clang). llvm-svn: 96935 --- llvm/Makefile.rules | 21 +++++++++++++++++++++ llvm/docs/MakefileGuide.html | 4 ++++ 2 files changed, 25 insertions(+) diff --git a/llvm/Makefile.rules b/llvm/Makefile.rules index 215df8628c96..649f8038bb60 100644 --- a/llvm/Makefile.rules +++ b/llvm/Makefile.rules @@ -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 #-------------------------------------------------------------------- diff --git a/llvm/docs/MakefileGuide.html b/llvm/docs/MakefileGuide.html index a9c0725f2156..b1f8292831ee 100644 --- a/llvm/docs/MakefileGuide.html +++ b/llvm/docs/MakefileGuide.html @@ -818,6 +818,10 @@ mklib by the configure script and always located in the
LLVMAS(defaulted)
Specifies the path to the llvm-as tool.
+
LLVMCC
+
Specifies the path to the LLVM capable compiler.
+
LLVMCXX
+
Specifies the path to the LLVM C++ capable compiler.
LLVMGCC(defaulted)
Specifies the path to the LLVM version of the GCC 'C' Compiler
LLVMGXX(defaulted)