[Lldb-commits] [PATCH] D94888: [lldb] Add -Wl, -rpath to make tests run with fresh built libc++
Fangrui Song via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Sun Jan 24 12:22:24 PST 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG50830e50031b: [lldb] Add -Wl,-rpath to make tests run with fresh built libc++ (authored by MaskRay).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94888/new/
https://reviews.llvm.org/D94888
Files:
lldb/packages/Python/lldbsuite/test/dotest.py
lldb/packages/Python/lldbsuite/test/make/Makefile.rules
Index: lldb/packages/Python/lldbsuite/test/make/Makefile.rules
===================================================================
--- lldb/packages/Python/lldbsuite/test/make/Makefile.rules
+++ lldb/packages/Python/lldbsuite/test/make/Makefile.rules
@@ -279,11 +279,6 @@
LD = $(CC)
LDFLAGS ?= $(CFLAGS)
LDFLAGS += $(LD_EXTRAS) $(ARCH_LDFLAGS)
-ifneq (,$(LLVM_LIBS_DIR))
- ifeq ($(OS),NetBSD)
- LDFLAGS += -L$(LLVM_LIBS_DIR) -Wl,-rpath,$(LLVM_LIBS_DIR)
- endif
-endif
ifeq (,$(filter $(OS), Windows_NT Android Darwin))
ifneq (,$(filter YES,$(ENABLE_THREADS)))
LDFLAGS += -pthread
@@ -393,21 +388,18 @@
ifeq (1,$(USE_LIBCPP))
CXXFLAGS += -DLLDB_USING_LIBCPP
- ifeq "$(OS)" "Linux"
- ifneq (,$(findstring clang,$(CC)))
- CXXFLAGS += -stdlib=libc++
- LDFLAGS += -stdlib=libc++
- else
- CXXFLAGS += -isystem /usr/include/c++/v1
- LDFLAGS += -lc++
- endif
- else ifeq "$(OS)" "Android"
+ ifeq "$(OS)" "Android"
# Nothing to do, this is already handled in
# Android.rules.
else
CXXFLAGS += -stdlib=libc++
LDFLAGS += -stdlib=libc++
endif
+ ifneq (,$(filter $(OS), FreeBSD Linux NetBSD))
+ ifneq (,$(LLVM_LIBS_DIR))
+ LDFLAGS += -Wl,-rpath,$(LLVM_LIBS_DIR)
+ endif
+ endif
endif
#----------------------------------------------------------------------
Index: lldb/packages/Python/lldbsuite/test/dotest.py
===================================================================
--- lldb/packages/Python/lldbsuite/test/dotest.py
+++ lldb/packages/Python/lldbsuite/test/dotest.py
@@ -761,8 +761,6 @@
return True, "libc++ always present"
if platform == "linux":
- if os.path.isdir("/usr/include/c++/v1"):
- return True, "Headers found, let's hope they work"
with tempfile.NamedTemporaryFile() as f:
cmd = [configuration.compiler, "-xc++", "-stdlib=libc++", "-o", f.name, "-"]
p = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94888.318856.patch
Type: text/x-patch
Size: 2000 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210124/17281e07/attachment.bin>
More information about the lldb-commits
mailing list