[PATCH] D148266: [clang][driver] Linking to just-built libc++.dylib when bootstrapping libc++ with clang

Louis Dionne via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 14 10:52:04 PDT 2023


ldionne added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/Darwin.cpp:413-414
 
+  // Including the path to the just-built libc++.dylib if libc++ is bootstrapped
+  // and <install>/bin/../lib/libc++.dylib is a valid path
+
----------------
I would reword this to:

```
// If the toolchain contains libc++.dylib (in <install>/bin/../lib/libc++.dylib), use that instead of the sysroot-provided one. This matches what we do for determining which libc++ headers to use.
```


================
Comment at: clang/lib/Driver/ToolChains/Darwin.cpp:432
   if (sysroot != "") {
     CmdArgs.push_back("-syslibroot");
     CmdArgs.push_back(C.getArgs().MakeArgString(sysroot));
----------------
Where do we set the usual `<sysroot>/usr/lib` search path? I think it might make sense to move the code you added to that place.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148266/new/

https://reviews.llvm.org/D148266



More information about the cfe-commits mailing list