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

YunQiang Su via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 23 16:01:59 PDT 2024


wzssyqa wrote:

> 
> Sure. The motivation on our side is a distributed compile service where the library doesn't exist on the remote end. This patch means we'll have to add knowledge about path layouts at link time to the remote setup at compile time. That's certainly doable, but kind of janky.
> 

I guess `using new-style always` can make things simpler. Since you won't need to know how to convert the target name to tail arch name. For every arch, it uses the same archive file name.

Does your `distributed compile service` is like:
    1. Use upload C/C++ code
    2. Your service compiles them to ASM code.
    3. User downloads the ASM code
    4. User assembles and link
If so, it will always have a trouble for any case, as the archive's filename differs between users local setup.
I think that problem is a chaos during the transition.
In fact, a filename like `clang_rt.profile-x86_64.lib` also contains info about path layout at compile time.
What you really need is an option for user to tell us their local path layout.

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


More information about the cfe-commits mailing list