diff options
author | Alyssa Ross <hi@alyssa.is> | 2024-06-09 07:10:51 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2024-06-09 07:20:18 +0100 |
commit | bf13eca852acddd5e44b5ad9b4ebc0629d612737 (patch) | |
tree | 6afcbf83eb66d754d43ac794a1fc502d9cfd45f7 /pkgs/development/compilers/rust | |
parent | ddc356c1f074bf2d5c86e890185e6854205252dd (diff) |
rustc: disable wasm32 if some gcc options are set
This is a temporary fix to get rustc building again with these configurations (which notably include the default aarch64-darwin one) without causing a stdenv rebuild. The real fix will be to avoid passing these options through the Clang wrapper when the target is overridden. It could be that there are packages that need wasm32-unknown-unknown beyond those I've marked as broken here — it's impossible to be sure without a full rebuild. But this should be most of them.
Diffstat (limited to 'pkgs/development/compilers/rust')
-rw-r--r-- | pkgs/development/compilers/rust/rustc.nix | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pkgs/development/compilers/rust/rustc.nix b/pkgs/development/compilers/rust/rustc.nix index ccaf681307e70..da458211550ff 100644 --- a/pkgs/development/compilers/rust/rustc.nix +++ b/pkgs/development/compilers/rust/rustc.nix @@ -103,7 +103,9 @@ in stdenv.mkDerivation (finalAttrs: { stdenv.targetPlatform.rust.rustcTargetSpec # Other targets that don't need any extra dependencies to build. - ] ++ optionals (!fastCross) [ + # Temporarily broken if some global compiler flags are set: + # https://github.com/NixOS/nixpkgs/pull/317273 + ] ++ optionals (!fastCross && !lib.any (a: lib.hasAttr a stdenv.hostPlatform.gcc) [ "cpu" "float-abi" "fpu" ] && stdenv.hostPlatform.gcc.thumb or true) [ "wasm32-unknown-unknown" # (build!=target): When cross-building a compiler we need to add |