rust-lang/wg-cargo-std-aware

Investigate custom libdir setting

ehuss opened this issue · 3 comments

ehuss commented

Cargo assumes a specific sysroot layout (primarily here). However, rustc may be built in such a way that the lib directory name is different from the default of "lib". This is via install.libdir in config.toml. See find_libdir.

I was unable to find any targets built by rust-lang that set this parameter. Rumor is that some linux distributions may set it (to things like "lib32" or "lib64"), but I cannot find any active linux distribution that does that.

This needs investigation to understand the impact, and what needs to be done. AFAIK, rustc cannot be queried for this path, so there is no way to discover how it is compiled.

ehuss commented

Note: Switch to --print=target-libdir once 1.43 is stable: rust-lang/rust#69608

Per #49 (comment) wasn't this stuff going away anyways?

ehuss commented

Oh, hmm. Yea, it was removed in rust-lang/cargo#7699.

Cargo still uses the libdir for some other dylib nonsense, but it is not related to build-std. Closing since this seems resolved, thanks!