From 5a6b8aa4dd198da5ee6f1ddceda869f7d86e3e10 Mon Sep 17 00:00:00 2001 From: Vince Harron Date: Sat, 28 Feb 2015 01:07:50 +0000 Subject: [PATCH] Use -fstandalone-debug for few tests to get around a Clang optimization clang-3.5+ outputs FullDebugInfo by default for Darwin/FreeBSD targets. Other targets do not, which causes several tests to fail. This flag enables FullDebugInfo for all targets. Fixes the following tests: TestCallStdStringFunction.py TestDataFormatterSkipSummary.py TestDataFormatterStdIterator.py TestDataFormatterStdList.py TestDataFormatterStdString.py TestSBValuePersist.py TestStringPrinter.py TestTypeCompletion.py llvm-svn: 230831 --- lldb/test/expression_command/call-function/Makefile | 7 +++++++ .../data-formatter/data-formatter-skip-summary/Makefile | 7 +++++++ .../data-formatter/data-formatter-stl/libstdcpp/iterator/Makefile | 7 +++++++ .../data-formatter/data-formatter-stl/libstdcpp/list/Makefile | 7 +++++++ .../data-formatter/data-formatter-stl/libstdcpp/string/Makefile | 7 +++++++ .../functionalities/data-formatter/data-formatter-synth/Makefile | 7 +++++++ lldb/test/functionalities/data-formatter/rdar-9974002/Makefile | 7 +++++++ lldb/test/functionalities/data-formatter/stringprinter/Makefile | 8 ++++++++ lldb/test/functionalities/type_completion/Makefile | 7 +++++++ lldb/test/lang/cpp/stl/Makefile | 7 +++++++ lldb/test/python_api/sbvalue_persist/Makefile | 7 +++++++ 11 files changed, 78 insertions(+) diff --git a/lldb/test/expression_command/call-function/Makefile b/lldb/test/expression_command/call-function/Makefile index 6a87edf..01a5853 100644 --- a/lldb/test/expression_command/call-function/Makefile +++ b/lldb/test/expression_command/call-function/Makefile @@ -2,6 +2,13 @@ LEVEL = ../../make CXX_SOURCES := main.cpp +# clang-3.5+ outputs FullDebugInfo by default for Darwin/FreeBSD +# targets. Other targets do not, which causes this test to fail. +# This flag enables FullDebugInfo for all targets. +ifneq (,$(findstring clang,$(CC))) + CFLAGS_EXTRAS := -fstandalone-debug +endif + include $(LEVEL)/Makefile.rules clean:: diff --git a/lldb/test/functionalities/data-formatter/data-formatter-skip-summary/Makefile b/lldb/test/functionalities/data-formatter/data-formatter-skip-summary/Makefile index 6b5bcee..b6e6d3a 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-skip-summary/Makefile +++ b/lldb/test/functionalities/data-formatter/data-formatter-skip-summary/Makefile @@ -2,6 +2,13 @@ LEVEL = ../../../make CXX_SOURCES := main.cpp +# clang-3.5+ outputs FullDebugInfo by default for Darwin/FreeBSD +# targets. Other targets do not, which causes this test to fail. +# This flag enables FullDebugInfo for all targets. +ifneq (,$(findstring clang,$(CC))) + CFLAGS_EXTRAS := -fstandalone-debug +endif + include $(LEVEL)/Makefile.rules CXXFLAGS += -O0 diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/Makefile b/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/Makefile index dd3264d..5644d90 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/Makefile +++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/Makefile @@ -5,4 +5,11 @@ CXX_SOURCES := main.cpp CFLAGS_EXTRAS := -O0 USE_LIBSTDCPP := 1 +# clang-3.5+ outputs FullDebugInfo by default for Darwin/FreeBSD +# targets. Other targets do not, which causes this test to fail. +# This flag enables FullDebugInfo for all targets. +ifneq (,$(findstring clang,$(CC))) + CFLAGS_EXTRAS := -fstandalone-debug +endif + include $(LEVEL)/Makefile.rules diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/Makefile b/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/Makefile index dd3264d..9919689 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/Makefile +++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/Makefile @@ -5,4 +5,11 @@ CXX_SOURCES := main.cpp CFLAGS_EXTRAS := -O0 USE_LIBSTDCPP := 1 +# clang-3.5+ outputs FullDebugInfo by default for Darwin/FreeBSD +# targets. Other targets do not, which causes this test to fail. +# This flag enables FullDebugInfo for all targets. +ifneq (,$(findstring clang,$(CC))) + CFLAGS_EXTRAS += -fstandalone-debug +endif + include $(LEVEL)/Makefile.rules diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/Makefile b/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/Makefile index dd3264d..9919689 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/Makefile +++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/Makefile @@ -5,4 +5,11 @@ CXX_SOURCES := main.cpp CFLAGS_EXTRAS := -O0 USE_LIBSTDCPP := 1 +# clang-3.5+ outputs FullDebugInfo by default for Darwin/FreeBSD +# targets. Other targets do not, which causes this test to fail. +# This flag enables FullDebugInfo for all targets. +ifneq (,$(findstring clang,$(CC))) + CFLAGS_EXTRAS += -fstandalone-debug +endif + include $(LEVEL)/Makefile.rules diff --git a/lldb/test/functionalities/data-formatter/data-formatter-synth/Makefile b/lldb/test/functionalities/data-formatter/data-formatter-synth/Makefile index 314f1cb..011cc07 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-synth/Makefile +++ b/lldb/test/functionalities/data-formatter/data-formatter-synth/Makefile @@ -2,4 +2,11 @@ LEVEL = ../../../make CXX_SOURCES := main.cpp +# clang-3.5+ outputs FullDebugInfo by default for Darwin/FreeBSD +# targets. Other targets do not, which causes this test to fail. +# This flag enables FullDebugInfo for all targets. +ifneq (,$(findstring clang,$(CC))) + CFLAGS_EXTRAS := -fstandalone-debug +endif + include $(LEVEL)/Makefile.rules diff --git a/lldb/test/functionalities/data-formatter/rdar-9974002/Makefile b/lldb/test/functionalities/data-formatter/rdar-9974002/Makefile index 314f1cb..011cc07 100644 --- a/lldb/test/functionalities/data-formatter/rdar-9974002/Makefile +++ b/lldb/test/functionalities/data-formatter/rdar-9974002/Makefile @@ -2,4 +2,11 @@ LEVEL = ../../../make CXX_SOURCES := main.cpp +# clang-3.5+ outputs FullDebugInfo by default for Darwin/FreeBSD +# targets. Other targets do not, which causes this test to fail. +# This flag enables FullDebugInfo for all targets. +ifneq (,$(findstring clang,$(CC))) + CFLAGS_EXTRAS := -fstandalone-debug +endif + include $(LEVEL)/Makefile.rules diff --git a/lldb/test/functionalities/data-formatter/stringprinter/Makefile b/lldb/test/functionalities/data-formatter/stringprinter/Makefile index 3e2b018..2f93166 100644 --- a/lldb/test/functionalities/data-formatter/stringprinter/Makefile +++ b/lldb/test/functionalities/data-formatter/stringprinter/Makefile @@ -1,4 +1,12 @@ LEVEL = ../../../make CXX_SOURCES := main.cpp CXXFLAGS += -std=c++11 + +# clang-3.5+ outputs FullDebugInfo by default for Darwin/FreeBSD +# targets. Other targets do not, which causes this test to fail. +# This flag enables FullDebugInfo for all targets. +ifneq (,$(findstring clang,$(CC))) + CFLAGS_EXTRAS := -fstandalone-debug +endif + include $(LEVEL)/Makefile.rules diff --git a/lldb/test/functionalities/type_completion/Makefile b/lldb/test/functionalities/type_completion/Makefile index 8a7102e..afb2a26 100644 --- a/lldb/test/functionalities/type_completion/Makefile +++ b/lldb/test/functionalities/type_completion/Makefile @@ -2,4 +2,11 @@ LEVEL = ../../make CXX_SOURCES := main.cpp +# clang-3.5+ outputs FullDebugInfo by default for Darwin/FreeBSD +# targets. Other targets do not, which causes this test to fail. +# This flag enables FullDebugInfo for all targets. +ifneq (,$(findstring clang,$(CC))) + CFLAGS_EXTRAS += -fstandalone-debug +endif + include $(LEVEL)/Makefile.rules diff --git a/lldb/test/lang/cpp/stl/Makefile b/lldb/test/lang/cpp/stl/Makefile index fe27980..22f335d 100644 --- a/lldb/test/lang/cpp/stl/Makefile +++ b/lldb/test/lang/cpp/stl/Makefile @@ -5,4 +5,11 @@ CFLAGS := -g -O0 clean: OBJECTS+=$(wildcard main.d.*) +# clang-3.5+ outputs FullDebugInfo by default for Darwin/FreeBSD +# targets. Other targets do not, which causes this test to fail. +# This flag enables FullDebugInfo for all targets. +ifneq (,$(findstring clang,$(CC))) + CFLAGS_EXTRAS := -fstandalone-debug +endif + include $(LEVEL)/Makefile.rules diff --git a/lldb/test/python_api/sbvalue_persist/Makefile b/lldb/test/python_api/sbvalue_persist/Makefile index ddffdcf..e746665 100644 --- a/lldb/test/python_api/sbvalue_persist/Makefile +++ b/lldb/test/python_api/sbvalue_persist/Makefile @@ -5,4 +5,11 @@ CXX_SOURCES := main.cpp # Clean renamed executable on 'make clean' clean: OBJECTS+=no_synth +# clang-3.5+ outputs FullDebugInfo by default for Darwin/FreeBSD +# targets. Other targets do not, which causes this test to fail. +# This flag enables FullDebugInfo for all targets. +ifneq (,$(findstring clang,$(CC))) + CFLAGS_EXTRAS := -fstandalone-debug +endif + include $(LEVEL)/Makefile.rules -- 2.7.4