[Lldb-commits] [lldb] r183333 - Fix Makefiles in the data-formatter-stl tests

Daniel Malea daniel.malea at intel.com
Wed Jun 5 12:32:34 PDT 2013


Author: dmalea
Date: Wed Jun  5 14:32:34 2013
New Revision: 183333

URL: http://llvm.org/viewvc/llvm-project?rev=183333&view=rev
Log:
Fix Makefiles in the data-formatter-stl tests
- specify compiler flag -stdlib=libstdc++ only if using clang (not supported in gcc)


Modified:
    lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/Makefile
    lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/Makefile
    lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/Makefile
    lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/Makefile
    lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/Makefile
    lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/Makefile
    lldb/trunk/test/make/Makefile.rules

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/Makefile?rev=183333&r1=183332&r2=183333&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/Makefile (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/Makefile Wed Jun  5 14:32:34 2013
@@ -2,7 +2,7 @@ LEVEL = ../../../../../make
 
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+CFLAGS_EXTRAS := -O0
+USE_LIBSTDCPP := 1
 
-CXXFLAGS += -stdlib=libstdc++ -O0
-LDFLAGS += -stdlib=libstdc++
+include $(LEVEL)/Makefile.rules

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/Makefile?rev=183333&r1=183332&r2=183333&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/Makefile (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/Makefile Wed Jun  5 14:32:34 2013
@@ -2,7 +2,7 @@ LEVEL = ../../../../../make
 
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+CFLAGS_EXTRAS := -O0
+USE_LIBSTDCPP := 1
 
-CXXFLAGS += -stdlib=libstdc++ -O0
-LDFLAGS += -stdlib=libstdc++
\ No newline at end of file
+include $(LEVEL)/Makefile.rules

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/Makefile?rev=183333&r1=183332&r2=183333&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/Makefile (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/Makefile Wed Jun  5 14:32:34 2013
@@ -2,7 +2,6 @@ LEVEL = ../../../../../make
 
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+USE_LIBSTDCPP := 1
 
-CXXFLAGS += -stdlib=libstdc++ -O0
-LDFLAGS += -stdlib=libstdc++
+include $(LEVEL)/Makefile.rules

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/Makefile?rev=183333&r1=183332&r2=183333&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/Makefile (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/Makefile Wed Jun  5 14:32:34 2013
@@ -2,7 +2,7 @@ LEVEL = ../../../../../make
 
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+CFLAGS_EXTRAS := -O0
+USE_LIBSTDCPP := 1
 
-CXXFLAGS += -stdlib=libstdc++ -O0
-LDFLAGS += -stdlib=libstdc++
+include $(LEVEL)/Makefile.rules

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/Makefile?rev=183333&r1=183332&r2=183333&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/Makefile (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/Makefile Wed Jun  5 14:32:34 2013
@@ -2,10 +2,7 @@ LEVEL = ../../../../../make
 
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+CFLAGS_EXTRAS := -O0
+USE_LIBSTDCPP := 1
 
-CXXFLAGS += -O0
-ifeq (,$(findstring gcc,$(CC)))
-CXXFLAGS += -stdlib=libstdc++
-LDFLAGS += -stdlib=libstdc++
-endif
+include $(LEVEL)/Makefile.rules

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/Makefile?rev=183333&r1=183332&r2=183333&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/Makefile (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/Makefile Wed Jun  5 14:32:34 2013
@@ -2,7 +2,7 @@ LEVEL = ../../../../../make
 
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+CXXFLAGS := -O0
+USE_LIBSTDCPP := 1
 
-CXXFLAGS += -stdlib=libstdc++ -O0
-LDFLAGS += -stdlib=libstdc++
\ No newline at end of file
+include $(LEVEL)/Makefile.rules

Modified: lldb/trunk/test/make/Makefile.rules
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/make/Makefile.rules?rev=183333&r1=183332&r2=183333&view=diff
==============================================================================
--- lldb/trunk/test/make/Makefile.rules (original)
+++ lldb/trunk/test/make/Makefile.rules Wed Jun  5 14:32:34 2013
@@ -112,6 +112,17 @@ cxx_compiler = $(if $(findstring clang,$
 cxx_linker = $(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)))))
 
 #----------------------------------------------------------------------
+# C++ standard library options
+#----------------------------------------------------------------------
+ifeq (1,$(USE_LIBSTDCPP))
+	# Clang requires an extra flag: -stdlib=libstdc++
+	ifneq (,$(findstring clang,$(CC)))
+		CFLAGS += -stdlib=libstdc++
+		LDFLAGS += -stdlib=libstdc++
+	endif
+endif
+
+#----------------------------------------------------------------------
 # dylib settings
 #----------------------------------------------------------------------
 ifneq "$(strip $(DYLIB_C_SOURCES))" ""





More information about the lldb-commits mailing list