diff options
Diffstat (limited to 'nixpkgs/pkgs/development/compilers/rust/rustc.nix')
-rw-r--r-- | nixpkgs/pkgs/development/compilers/rust/rustc.nix | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/nixpkgs/pkgs/development/compilers/rust/rustc.nix b/nixpkgs/pkgs/development/compilers/rust/rustc.nix index 6e0afa1b8f57..0a4a351b1cfd 100644 --- a/nixpkgs/pkgs/development/compilers/rust/rustc.nix +++ b/nixpkgs/pkgs/development/compilers/rust/rustc.nix @@ -175,8 +175,7 @@ in stdenv.mkDerivation (finalAttrs: { python ./x.py --keep-stage=0 --stage=1 install library/std mkdir -v $out/bin $doc $man - ln -s ${rustc.unwrapped}/bin/rustc $out/bin - makeWrapper ${rustc.unwrapped}/bin/rustdoc $out/bin/rustdoc --add-flags "--sysroot $out" + ln -s ${rustc.unwrapped}/bin/{rustc,rustdoc} $out/bin ln -s ${rustc.unwrapped}/lib/rustlib/{manifest-rust-std-,}${stdenv.hostPlatform.rust.rustcTargetSpec} $out/lib/rustlib/ echo rust-std-${stdenv.hostPlatform.rust.rustcTargetSpec} >> $out/lib/rustlib/components lndir ${rustc.doc} $doc @@ -197,18 +196,6 @@ in stdenv.mkDerivation (finalAttrs: { # Useful debugging parameter # export VERBOSE=1 - '' + lib.optionalString (stdenv.targetPlatform.isMusl && !stdenv.targetPlatform.isStatic) '' - # Upstream rustc still assumes that musl = static[1]. The fix for - # this is to disable crt-static by default for non-static musl - # targets. - # - # Even though Cargo will build build.rs files for the build platform, - # cross-compiling _from_ musl appears to work fine, so we only need - # 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/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 # Using a value of 48 should work on both emulated and native x86_64-darwin. |