summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2015-09-18 22:26:34 +0000
committerEnrico Granata <egranata@apple.com>2015-09-18 22:26:34 +0000
commitf6fe302ee422bed7362e01a200338f71172be1f9 (patch)
tree125274d484f8801017ea0fce2e52da95e4cddda7
parent9779535c5d41f740b67196a389317b7a23c64e96 (diff)
downloadbcm5719-llvm-f6fe302ee422bed7362e01a200338f71172be1f9.tar.gz
bcm5719-llvm-f6fe302ee422bed7362e01a200338f71172be1f9.zip
On Linux, if you can't actually locate the libc++ install, do not attempt to use it
The failure mode when one gets this wrong is quite gnarly to then walk oneself out of, and if you can't actually find the library, trying to build against it is fairly pointless anyway This + my previous skip_if_library_missing change should make running the libc++ tests on a Linux machine without it much more seamless llvm-svn: 248057
-rw-r--r--lldb/test/make/Makefile.rules13
1 files changed, 9 insertions, 4 deletions
diff --git a/lldb/test/make/Makefile.rules b/lldb/test/make/Makefile.rules
index d5d7fa6859a..c7118b73e2d 100644
--- a/lldb/test/make/Makefile.rules
+++ b/lldb/test/make/Makefile.rules
@@ -284,12 +284,17 @@ endif
ifeq (1,$(USE_LIBCPP))
# Clang requires an extra flag: -stdlib=libstdc++
ifneq (,$(findstring clang,$(CC)))
- CXXFLAGS += -stdlib=libc++
- LDFLAGS += -stdlib=libc++
ifeq "$(OS)" "Linux"
# This is the default install location on Ubuntu 14.04
- CXXFLAGS += -I/usr/include/c++/v1
- endif
+ ifneq ($(wildcard /usr/include/c++/v1/.),)
+ CXXFLAGS += -stdlib=libc++
+ LDFLAGS += -stdlib=libc++
+ CXXFLAGS += -I/usr/include/c++/v1
+ endif
+ else
+ CXXFLAGS += -stdlib=libc++
+ LDFLAGS += -stdlib=libc++
+ endif
endif
endif
OpenPOWER on IntegriCloud