fahadnayyar added inline comments.
================ Comment at: clang/lib/Driver/ToolChains/Darwin.cpp:432 if (sysroot != "") { CmdArgs.push_back("-syslibroot"); CmdArgs.push_back(C.getArgs().MakeArgString(sysroot)); ---------------- ldionne wrote: > ldionne wrote: > > 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. > What I mean: there's a place where we must be adding `-L <sysroot>/usr/lib` > in the code, and it isn't in `darwin::Linker::AddLinkArgs`. Where is it? > Would it make sense to move the code you added to that place instead? <sysroot>/usr/local/include is added here in ```DarwinClang::AddClangSystemIncludeArgs```: https://github.com/llvm/llvm-project/blob/main/clang/lib/Driver/ToolChains/Darwin.cpp#L2346 and <sysroot>/usr/include is added here: https://github.com/llvm/llvm-project/blob/main/clang/lib/Driver/ToolChains/Darwin.cpp#L2374 .. But since we want to add a new argument to the linker invocation, I feel ```darwin::Linker::AddLinkArgs``` is the best place. But let me know if you think otherwise. 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