diff options
author | Greg Clayton <gclayton@apple.com> | 2016-05-12 22:33:02 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2016-05-12 22:33:02 +0000 |
commit | ff8e6a763f5238b80b8c57b6f36628b8975cdcd2 (patch) | |
tree | a90e29eb2af8c3e3458c9e2af22f4cb3d4414cdf /lldb/packages/Python/lldbsuite/test | |
parent | a9f3e908bfeb0883cdf5319d407d8e34d47c9409 (diff) | |
download | bcm5719-llvm-ff8e6a763f5238b80b8c57b6f36628b8975cdcd2.tar.gz bcm5719-llvm-ff8e6a763f5238b80b8c57b6f36628b8975cdcd2.zip |
Fix libstdc++ failure where <atomic> is not able to be imported on Darwin systems.
The adding of <atomic> to test_common.h broke 12 tests on Darwin. We work around this by not including <atomic> when building on darwin for libstdc++ tests.
llvm-svn: 269372
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
3 files changed, 10 insertions, 6 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-skip-summary/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-skip-summary/Makefile index b438bbb970f..a92cffcc319 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-skip-summary/Makefile +++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-skip-summary/Makefile @@ -1,6 +1,7 @@ LEVEL = ../../../make CXX_SOURCES := main.cpp +USE_LIBSTDCPP := 1 # clang-3.5+ outputs FullDebugInfo by default for Darwin/FreeBSD # targets. Other targets do not, which causes this test to fail. @@ -12,8 +13,3 @@ endif include $(LEVEL)/Makefile.rules CXXFLAGS += -O0 - -ifeq (,$(findstring gcc,$(CC))) -CXXFLAGS += -stdlib=libstdc++ -LDFLAGS += -stdlib=libstdc++ -endif diff --git a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules index f39ab9a9b0f..38e36700577 100644 --- a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules +++ b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules @@ -306,7 +306,7 @@ endif ifeq (1,$(USE_LIBSTDCPP)) # Clang requires an extra flag: -stdlib=libstdc++ ifneq (,$(findstring clang,$(CC))) - CXXFLAGS += -stdlib=libstdc++ + CXXFLAGS += -stdlib=libstdc++ -DLLDB_USING_LIBSTDCPP LDFLAGS += -stdlib=libstdc++ endif endif diff --git a/lldb/packages/Python/lldbsuite/test/make/test_common.h b/lldb/packages/Python/lldbsuite/test/make/test_common.h index a002f9fa9a4..92c3cd2bc8f 100644 --- a/lldb/packages/Python/lldbsuite/test/make/test_common.h +++ b/lldb/packages/Python/lldbsuite/test/make/test_common.h @@ -43,6 +43,13 @@ #endif +#if defined(__APPLE__) && defined(LLDB_USING_LIBSTDCPP) + +// on Darwin, libstdc++ is missing <atomic>, so this would cause any test to fail building +// since this header file is being included in every C-family test case, we need to not include it +// on Darwin, most tests use libc++ by default, so this will only affect tests that explicitly require libstdc++ + +#else #ifdef __cplusplus #include <atomic> @@ -65,3 +72,4 @@ typedef std::atomic<int> pseudo_barrier_t; (barrier) = (count); \ } while (0) #endif // __cplusplus +#endif // defined(__APPLE__) && defined(LLDB_USING_LIBSTDCPP) |