[Lldb-commits] [PATCH] D129166: [lldb] Make sure we use the libc++ from the build dir
Jonas Devlieghere via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Jul 5 16:33:12 PDT 2022
JDevlieghere created this revision.
JDevlieghere added reviewers: labath, dblaikie, clayborg, aprantl, mib.
Herald added a project: All.
JDevlieghere requested review of this revision.
Make sure we use the libc++ from the build dir. Currently, by passing `-stdlib=libc++`, we might pick up the system libc++ on macOS. This change ensures that if `LLVM_LIBS_DIR` is set, we try to use the libc++ from there.
https://reviews.llvm.org/D129166
Files:
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
@@ -392,12 +392,13 @@
# 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)
+ # Use the libc++ from the build dir
+ CXXFLAGS += -nostdlib++
+ LDFLAGS += -L$(LLVM_LIBS_DIR) -Wl,-rpath,$(LLVM_LIBS_DIR) -lc++
+ else
+ CXXFLAGS += -stdlib=libc++
+ LDFLAGS += -stdlib=libc++
endif
endif
endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129166.442411.patch
Type: text/x-patch
Size: 764 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220705/2efbdef2/attachment.bin>
More information about the lldb-commits
mailing list