ldionne requested changes to this revision. ldionne added a comment. This revision now requires changes to proceed.
Thanks for working on this! This generally LGTM, with a few comments. You should be able to add tests in a way similar to `clang/test/Driver/darwin-header-search-libcxx.cpp`. The idea is basically to create a dummy sysroot that contains a `libc++.dylib` file in the right location and trick the compiler into adding `-L` as you want. ================ Comment at: clang/lib/Driver/ToolChains/Darwin.cpp:416 + + llvm::SmallString<128> LibCXXDylibDirPath = + llvm::StringRef(D.getInstalledDir()); // <install>/bin ---------------- ================ Comment at: clang/lib/Driver/ToolChains/Darwin.cpp:421 + llvm::SmallString<128> LibCXXDylibPath = LibCXXDylibDirPath; + llvm::sys::path::append(LibCXXDylibPath, "..", "lib", "libc++.dylib"); + ---------------- Otherwise you are forming the path `<install>/bin/../lib/../lib/libc++.dylib`, which is correct but weird. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148266/new/ https://reviews.llvm.org/D148266 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits