Substitute cc with c++ when compiling c++ test files for Siva Chandra : http://reviews.llvm.org/D6199
llvm-svn: 221692
This commit is contained in:
parent
a29986c0b0
commit
1ecb68d5ce
|
|
@ -130,11 +130,27 @@ ifneq "$(DYLIB_NAME)" ""
|
|||
endif
|
||||
|
||||
# Function that returns the counterpart C++ compiler, given $(CC) as arg.
|
||||
cxx_compiler_notdir = $(if $(findstring clang,$(1)), $(subst clang,clang++,$(1)), $(if $(findstring icc,$(1)), $(subst icc,icpc,$(1)), $(if $(findstring llvm-gcc,$(1)), $(subst llvm-gcc,llvm-g++,$(1)), $(subst gcc,g++,$(1)))))
|
||||
cxx_compiler_notdir = $(if $(findstring clang,$(1)), \
|
||||
$(subst clang,clang++,$(1)), \
|
||||
$(if $(findstring icc,$(1)), \
|
||||
$(subst icc,icpc,$(1)), \
|
||||
$(if $(findstring llvm-gcc,$(1)), \
|
||||
$(subst llvm-gcc,llvm-g++,$(1)), \
|
||||
$(if $(findstring gcc,$(1)), \
|
||||
$(subst gcc,g++,$(1)), \
|
||||
$(subst cc,c++,$(1))))))
|
||||
cxx_compiler = $(if $(findstring /,$(1)),$(join $(dir $(1)), $(call cxx_compiler_notdir,$(notdir $(1)))),$(call cxx_compiler_notdir,$(1)))
|
||||
|
||||
# Function that returns the C++ linker, given $(CC) as arg.
|
||||
cxx_linker_notdir = $(if $(findstring clang,$(1)), $(subst clang,clang++,$(1)), $(if $(findstring icc,$(1)), $(subst icc,icpc,$(1)), $(if $(findstring llvm-gcc,$(1)), $(subst llvm-gcc,llvm-g++,$(1)), $(subst gcc,g++,$(1)))))
|
||||
cxx_linker_notdir = $(if $(findstring clang,$(1)), \
|
||||
$(subst clang,clang++,$(1)), \
|
||||
$(if $(findstring icc,$(1)), \
|
||||
$(subst icc,icpc,$(1)), \
|
||||
$(if $(findstring llvm-gcc,$(1)), \
|
||||
$(subst llvm-gcc,llvm-g++,$(1)), \
|
||||
$(if $(findstring gcc,$(1)), \
|
||||
$(subst gcc,g++,$(1)), \
|
||||
$(subst cc,c++,$(1))))))
|
||||
cxx_linker = $(if $(findstring /,$(1)),$(join $(dir $(1)), $(call cxx_linker_notdir,$(notdir $(1)))),$(call cxx_linker_notdir,$(1)))
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Reference in New Issue