[PATCH] D45639: [Driver] Support default libc++ library location on Darwin
Petr Hosek via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 10 15:34:17 PST 2020
phosek updated this revision to Diff 304342.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D45639/new/
https://reviews.llvm.org/D45639
Files:
clang/lib/Driver/ToolChains/Darwin.cpp
clang/test/Driver/darwin-ld.c
Index: clang/test/Driver/darwin-ld.c
===================================================================
--- clang/test/Driver/darwin-ld.c
+++ clang/test/Driver/darwin-ld.c
@@ -365,3 +365,8 @@
// RUN: FileCheck -check-prefix=MNO_OUTLINE %s < %t.log
// MNO_OUTLINE: {{ld(.exe)?"}}
// MNO_OUTLINE-SAME: "-mllvm" "-enable-machine-outliner=never"
+
+// RUN: %clang -target x86_64-apple-darwin10 -### %t.o 2> %t.log
+// RUN: FileCheck -check-prefix=INSTALL-DIR %s < %t.log
+// INSTALL-DIR: InstalledDir: [[INSTALLDIR:.+$]]
+// INSTALL-DIR: "-L[[INSTALLDIR]]/../lib"
Index: clang/lib/Driver/ToolChains/Darwin.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Darwin.cpp
+++ clang/lib/Driver/ToolChains/Darwin.cpp
@@ -591,6 +591,8 @@
Args.AddAllArgs(CmdArgs, options::OPT_L);
+ getToolChain().AddFilePathLibArgs(Args, CmdArgs);
+
AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs, JA);
// Build the input file for -filelist (list of linker input files) in case we
// need it later
@@ -774,6 +776,7 @@
getProgramPaths().push_back(getDriver().getInstalledDir());
if (getDriver().getInstalledDir() != getDriver().Dir)
getProgramPaths().push_back(getDriver().Dir);
+ getFilePaths().push_back(getDriver().Dir + "/../lib");
}
/// Darwin - Darwin tool chain for i386 and x86_64.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45639.304342.patch
Type: text/x-patch
Size: 1359 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201110/bd669e7a/attachment.bin>
More information about the cfe-commits
mailing list