diff options
author | Alex Martens <alex@thinglab.org> | 2022-10-07 07:35:29 -0700 |
---|---|---|
committer | Alex Martens <alex@thinglab.org> | 2022-10-07 07:35:29 -0700 |
commit | bac7ee3208209cca6d8c58ade2f25e3f91053848 (patch) | |
tree | d6fbfa6d24bf5c4373af68af0961d896f712f611 /pkgs/development/compilers/rust | |
parent | 8e9a77e2b52fe5dda0121594b6e15d970cf60723 (diff) | |
download | nixlib-bac7ee3208209cca6d8c58ade2f25e3f91053848.tar nixlib-bac7ee3208209cca6d8c58ade2f25e3f91053848.tar.gz nixlib-bac7ee3208209cca6d8c58ade2f25e3f91053848.tar.bz2 nixlib-bac7ee3208209cca6d8c58ade2f25e3f91053848.tar.lz nixlib-bac7ee3208209cca6d8c58ade2f25e3f91053848.tar.xz nixlib-bac7ee3208209cca6d8c58ade2f25e3f91053848.tar.zst nixlib-bac7ee3208209cca6d8c58ade2f25e3f91053848.zip |
rustc: fix build for no_std targets
Diffstat (limited to 'pkgs/development/compilers/rust')
-rw-r--r-- | pkgs/development/compilers/rust/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/compilers/rust/rustc.nix | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/pkgs/development/compilers/rust/default.nix b/pkgs/development/compilers/rust/default.nix index 7c78a784575a..ef01cbf2abc1 100644 --- a/pkgs/development/compilers/rust/default.nix +++ b/pkgs/development/compilers/rust/default.nix @@ -28,7 +28,7 @@ in lib = lib'; # Backwards compat before `lib` was factored out. - inherit (lib') toTargetArch toTargetOs toRustTarget toRustTargetSpec; + inherit (lib') toTargetArch toTargetOs toRustTarget toRustTargetSpec IsNoStdTarget; # This just contains tools for now. But it would conceivably contain # libraries too, say if we picked some default/recommended versions from diff --git a/pkgs/development/compilers/rust/rustc.nix b/pkgs/development/compilers/rust/rustc.nix index bb5bc1bb1d73..94b7171c02d3 100644 --- a/pkgs/development/compilers/rust/rustc.nix +++ b/pkgs/development/compilers/rust/rustc.nix @@ -107,6 +107,8 @@ in stdenv.mkDerivation rec { "${setHost}.musl-root=${pkgsBuildHost.targetPackages.stdenv.cc.libc}" ] ++ optionals stdenv.targetPlatform.isMusl [ "${setTarget}.musl-root=${pkgsBuildTarget.targetPackages.stdenv.cc.libc}" + ] ++ optionals (rust.IsNoStdTarget stdenv.targetPlatform) [ + "--disable-docs" ]; # The bootstrap.py will generated a Makefile that then executes the build. |