[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
Tue Jan 19 09:14:50 PST 2021
MaskRay updated this revision to Diff 317599.
MaskRay added a comment.
Delete `if os.path.isdir("/usr/include/c++/v1"):`
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
@@ -281,11 +281,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
@@ -395,21 +390,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.317599.patch
Type: text/x-patch
Size: 2000 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210119/3f295180/attachment.bin>
More information about the lldb-commits
mailing list