[clang] [Driver] Ensure ToolChain::LibraryPaths is not empty for non-Darwin (PR #87866)

Martin Storsjö via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 23 05:22:37 PDT 2024


mstorsjo wrote:

> This is a behavior change: In distributed build environments, neither lib file exists at compile time. Previously, this would result in the "old" style, now (together with #81037) it results in the "new" style (which we disable everywhere since it causes all kinds of issues – from what I can tell, we're not alone in this).

Hmm, in which cases does this PR change anything of what happens at compile time? The only functional behaviour difference I'm aware of, is that `clang --print-runtime-dir` now always prints the new style path, even if the old style path exists and was expected to be used.

There have been talks about embedding directives for autolinking compiler-rt builtins for msvc mode builds, and switching between old and new path style depending on what files exist on disk (which would be a problem for the kind of distributed build environment you have, admittedly!), but that's not implemented yet. Or is this already the case for embedded directives for asan? And based on your linked issue, apparently also for profiling?

Can you distill out a minimal standalone command that showcases compiling, and shows the embedded directive that gets changed by this PR?

https://github.com/llvm/llvm-project/pull/87866


More information about the cfe-commits mailing list