diff options
| author | John Ericson <John.Ericson@Obsidian.Systems> | 2020-11-29 17:47:51 +0000 |
|---|---|---|
| committer | John Ericson <John.Ericson@Obsidian.Systems> | 2020-11-29 17:47:51 +0000 |
| commit | f5f038127eafe83edb14df3fc464a1a4a0d93c7e (patch) | |
| tree | a8254495c8a35b17aa9a4b0da11f6a79949dde0c /pkgs/development/compilers/rust | |
| parent | Merge pull request #105305 from lopsided98/build-rust-crate-platform-hash (diff) | |
| download | nixpkgs-origin/more-rustc-musl.tar.gz | |
rustc: Improve musl supportorigin/more-rustc-musl
There was a slight error in the target logic I didn't notice before, and
also should do the same thing for the other platforms.
Diffstat (limited to 'pkgs/development/compilers/rust')
| -rw-r--r-- | pkgs/development/compilers/rust/rustc.nix | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pkgs/development/compilers/rust/rustc.nix b/pkgs/development/compilers/rust/rustc.nix index 1fd3bbaba921..9e8000130724 100644 --- a/pkgs/development/compilers/rust/rustc.nix +++ b/pkgs/development/compilers/rust/rustc.nix @@ -93,8 +93,12 @@ in stdenv.mkDerivation rec { "${setTarget}.llvm-config=${llvmSharedForTarget}/bin/llvm-config" ] ++ optionals (stdenv.isLinux && !stdenv.targetPlatform.isRedox) [ "--enable-profiler" # build libprofiler_builtins + ] ++ optionals stdenv.buildPlatform.isMusl [ + "${setBuild}.musl-root=${pkgsBuildBuild.targetPackages.stdenv.cc.libc}" + ] ++ optionals stdenv.hostPlatform.isMusl [ + "${setHost}.musl-root=${pkgsBuildHost.targetPackages.stdenv.cc.libc}" ] ++ optionals stdenv.targetPlatform.isMusl [ - "${setTarget}.musl-root=${targetPackages.stdenv.cc.libc}" + "${setTarget}.musl-root=${pkgsBuildTarget.targetPackages.stdenv.cc.libc}" ]; # The bootstrap.py will generated a Makefile that then executes the build. |
