[clang] Reland "[clang][modules] Print library module manifest path." (PR #82160)

Mark de Wever via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 11 11:56:56 PDT 2024


mordante wrote:

> The point is to build libraries and test clang at once. The `TC.getFilePaths` is constructed from following items in `ToolChain::ToolChain`
> 
>     1. `BUILD/bin/../lib/x86_64-unknown-linux-gnu`
> 
>     2. `%t/Inputs/usr/lib/x86_64-linux-gnu`
> 
>     3. `%t/Inputs/usr/lib`
> 
> 
> Yes. It contains 1st item at run time if you build libraries. As a result, `GetStdModuleManifestPath` find `BUILD/bin/../lib/x86_64-unknown-linux-gnu/libc++.so` first. However, `modules.json` is at `%t/Inputs/usr/lib/x86_64-linux-gnu/modules.json`.
> 
> Hope this helps you.

I can indeed reproduce this. I'm not sure whether this is the expected result. There is no real documentation for `-sysroot`, but it is intended for cross-compilation. @ChuanqiXu9 since you suggested this test approach, do you know whether this is the expected behavior of `-sysroot` ?

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


More information about the cfe-commits mailing list