[Lldb-commits] [lldb] r221692 - Substitute cc with c++ when compiling c++ test files for Siva Chandra : http://reviews.llvm.org/D6199

Shawn Best sbest at blueshiftinc.com
Tue Nov 11 09:34:58 PST 2014


Author: sbest
Date: Tue Nov 11 11:34:58 2014
New Revision: 221692

URL: http://llvm.org/viewvc/llvm-project?rev=221692&view=rev
Log:
Substitute cc with c++ when compiling c++ test files for Siva Chandra : http://reviews.llvm.org/D6199

Modified:
    lldb/trunk/test/make/Makefile.rules

Modified: lldb/trunk/test/make/Makefile.rules
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/make/Makefile.rules?rev=221692&r1=221691&r2=221692&view=diff
==============================================================================
--- lldb/trunk/test/make/Makefile.rules (original)
+++ lldb/trunk/test/make/Makefile.rules Tue Nov 11 11:34:58 2014
@@ -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)))
 
 #----------------------------------------------------------------------





More information about the lldb-commits mailing list