diff options
Diffstat (limited to 'nixpkgs/pkgs/development/compilers/rust/rustc.nix')
-rw-r--r-- | nixpkgs/pkgs/development/compilers/rust/rustc.nix | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/nixpkgs/pkgs/development/compilers/rust/rustc.nix b/nixpkgs/pkgs/development/compilers/rust/rustc.nix index 7fe33a4011e5..6e0afa1b8f57 100644 --- a/nixpkgs/pkgs/development/compilers/rust/rustc.nix +++ b/nixpkgs/pkgs/development/compilers/rust/rustc.nix @@ -65,6 +65,8 @@ in stdenv.mkDerivation (finalAttrs: { # Increase codegen units to introduce parallelism within the compiler. RUSTFLAGS = "-Ccodegen-units=10"; + RUSTDOCFLAGS = "-A rustdoc::broken-intra-doc-links"; + # We need rust to build rust. If we don't provide it, configure will try to download it. # Reference: https://github.com/rust-lang/rust/blob/master/src/bootstrap/configure.py configureFlags = let @@ -100,6 +102,10 @@ in stdenv.mkDerivation (finalAttrs: { "--target=${concatStringsSep "," ([ stdenv.targetPlatform.rust.rustcTargetSpec + # Other targets that don't need any extra dependencies to build. + ] ++ optionals (!fastCross) [ + "wasm32-unknown-unknown" + # (build!=target): When cross-building a compiler we need to add # the build platform as well so rustc can compile build.rs # scripts. @@ -201,7 +207,7 @@ in stdenv.mkDerivation (finalAttrs: { # to do this when rustc's target platform is dynamically linked musl. # # [1]: https://github.com/rust-lang/compiler-team/issues/422 - substituteInPlace compiler/rustc_target/src/spec/linux_musl_base.rs \ + substituteInPlace compiler/rustc_target/src/spec/base/linux_musl.rs \ --replace "base.crt_static_default = true" "base.crt_static_default = false" '' + lib.optionalString (stdenv.isDarwin && stdenv.isx86_64) '' # See https://github.com/jemalloc/jemalloc/issues/1997 |