Benjamin Saunders
Benjamin Saunders
A reasonable solution might be to have a fixup (or default behavior...) to propagate `rustc-link-search` paths to downstream targets, perhaps raising a warning if they're not hermetic.
It looks like [`-Z link-native-libraries=no`](https://doc.rust-lang.org/unstable-book/compiler-flags/link-native-libraries.html) is the intended solution for this situation on the rustc side. Unfortunately not usable with stable Rust... de-facto requiring nightly Rust for nontrivial buck2 Rust...
Thanks! That should work well in practice. Ideally we could set this flag without also globally enabling nightly features, which might not otherwise be desired, but that's a fairly small...
For posterity: Passing `-Z link-native-libraries=no` also disables the dependencies Rust's std pulls in on Windows, at https://github.com/rust-lang/rust/blob/master/library/std/src/sys/pal/windows/c/windows_sys.rs. With a system CXX toolchain, these additional `rustc_flags` get things working again: `"-Clink-arg=msvcrt.lib",...