rust-lang / wg-cargo-std-aware

Repo for working on "std aware cargo"
133 stars 8 forks source link

Investigate custom libdir setting #48

Closed ehuss closed 4 years ago

ehuss commented 4 years ago

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 4 years ago

Note: Switch to --print=target-libdir once 1.43 is stable: https://github.com/rust-lang/rust/pull/69608

Ericson2314 commented 4 years ago

Per https://github.com/rust-lang/wg-cargo-std-aware/issues/49#issuecomment-550431175 wasn't this stuff going away anyways?

ehuss commented 4 years ago

Oh, hmm. Yea, it was removed in https://github.com/rust-lang/cargo/pull/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!