nixpkgs/pkgs/build-support/rust
Alyssa Ross 8b51cdd3be rustc: add a compiler wrapper
We keep running into situations where we can't get the right
combination of rustc flags through build systems into rustc.
RUSTFLAGS is the only variable supported across build systems, but if
RUSTFLAGS is set, Cargo will ignore all other ways of specifying rustc
flags, including the target-specific ones, which we need to make
dynamic musl builds work.  (This is why pkgsCross.musl64.crosvm is
currently broken — it works if you unset separateDebugInfo, which
causes RUSTFLAGS not to be set.)

So, we need to do the same thing we do for C and C++ compilers, and
add a compiler wrapper so we can inject the flags we need, regardless
of the build system.

Currently the wrapper only supports a single mechanism for injecting
flags — the NIX_RUSTFLAGS environment variable.  As time goes on,
we'll probably want to add additional features, like target-specific
environment variables.
2023-11-30 09:23:06 +00:00
..
build-rust-crate Merge pull request #266787 from tvbeat/cargo-manifest-links 2023-11-19 16:14:58 +01:00
build-rust-package lib.systems: elaborate Rust metadata 2023-11-09 10:02:24 +01:00
fetch-cargo-tarball rustPlatform.fetchCargoTarball: remove explicit sparse protocol 2023-06-02 21:28:57 -04:00
hooks lib.systems: elaborate Rust metadata 2023-11-09 10:02:24 +01:00
lib lib.systems: elaborate Rust metadata 2023-11-09 10:02:24 +01:00
rustc-wrapper rustc: add a compiler wrapper 2023-11-30 09:23:06 +00:00
sysroot build-support/rust/sysroot: let cargo-src crate become no_std 2023-03-12 12:24:23 +01:00
test/import-cargo-lock tests.importCargoLock.maturin: reexport maturin.tests.pyo3 2023-06-19 10:42:24 -04:00
default-crate-overrides.nix default-crate-overrides: add libseat-sys 2023-08-26 01:08:29 -07:00
fetchcargo-default-config.toml
fetchcrate.nix fetchCrate: fix registryDl 2023-05-28 13:20:03 -04:00
import-cargo-lock.nix importCargoLock: fix git dep config file 2023-06-29 21:47:27 +08:00
replace-workspace-values.py rustPlatform.importCargoLock: fix [package] section handling 2023-04-29 21:05:05 +02:00