diff --git a/Makefile.rules b/Makefile.rules index 215df8628c9..649f8038bb6 100644 --- a/Makefile.rules +++ b/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/docs/MakefileGuide.html b/docs/MakefileGuide.html index a9c0725f215..b1f8292831e 100644 --- a/docs/MakefileGuide.html +++ b/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)