From b00f262516fa3c491fb8d43cf98117f1d38fdd14 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Mon, 10 Jun 2024 10:14:37 +0100 Subject: [PATCH] Revert "rustc: disable wasm32 if some gcc options are set" This reverts commits 6d0ba08b970248d207addab47dfd09c0dc3b0895, 723100d83bb87129ef013be6d1f03e4097de72c2, and bf13eca852acddd5e44b5ad9b4ebc0629d612737. The underlying issue has now been fixed, so we can re-enable wasm32-unknown-unknown on all platforms. --- pkgs/applications/blockchains/polkadot/default.nix | 3 --- pkgs/applications/misc/pagefind/default.nix | 4 ---- pkgs/by-name/re/rerun/package.nix | 3 --- pkgs/by-name/su/surrealist/package.nix | 3 --- pkgs/by-name/te/tetrio-desktop/tetrio-plus.nix | 3 --- pkgs/development/compilers/rust/rustc.nix | 4 +--- pkgs/servers/ldap/lldap/default.nix | 4 ---- pkgs/servers/teleport/generic.nix | 5 +---- 8 files changed, 2 insertions(+), 27 deletions(-) diff --git a/pkgs/applications/blockchains/polkadot/default.nix b/pkgs/applications/blockchains/polkadot/default.nix index f247b05eb93a..cfc66da2d586 100644 --- a/pkgs/applications/blockchains/polkadot/default.nix +++ b/pkgs/applications/blockchains/polkadot/default.nix @@ -93,8 +93,5 @@ rustPlatform.buildRustPackage rec { maintainers = with maintainers; [ akru andresilva FlorianFranzen RaghavSood ]; # See Iso::from_arch in src/isa/mod.rs in cranelift-codegen-meta. platforms = intersectLists platforms.unix (platforms.aarch64 ++ platforms.s390x ++ platforms.riscv64 ++ platforms.x86); - # See comment about wasm32-unknown-unknown in rustc.nix. - broken = lib.any (a: lib.hasAttr a stdenv.hostPlatform.gcc) [ "cpu" "float-abi" "fpu" ] || - !stdenv.hostPlatform.gcc.thumb or true; }; } diff --git a/pkgs/applications/misc/pagefind/default.nix b/pkgs/applications/misc/pagefind/default.nix index aa0fb08984ed..2da4e5eb7eb1 100644 --- a/pkgs/applications/misc/pagefind/default.nix +++ b/pkgs/applications/misc/pagefind/default.nix @@ -8,7 +8,6 @@ , gzip , nodejs , rustc -, stdenv , wasm-bindgen-cli , wasm-pack }: @@ -121,9 +120,6 @@ rustPlatform.buildRustPackage rec { license = licenses.mit; maintainers = with maintainers; [ pbsds ]; platforms = platforms.unix; - # See comment about wasm32-unknown-unknown in rustc.nix. - broken = lib.any (a: lib.hasAttr a stdenv.hostPlatform.gcc) [ "cpu" "float-abi" "fpu" ] || - !stdenv.hostPlatform.gcc.thumb or true; mainProgram = "pagefind"; }; } diff --git a/pkgs/by-name/re/rerun/package.nix b/pkgs/by-name/re/rerun/package.nix index 6fedb10cfed1..4d9c8da8041c 100644 --- a/pkgs/by-name/re/rerun/package.nix +++ b/pkgs/by-name/re/rerun/package.nix @@ -126,8 +126,5 @@ rustPlatform.buildRustPackage rec { ]; maintainers = with maintainers; [ SomeoneSerge ]; mainProgram = "rerun"; - # See comment about wasm32-unknown-unknown in rustc.nix. - broken = lib.any (a: lib.hasAttr a stdenv.hostPlatform.gcc) [ "cpu" "float-abi" "fpu" ] || - !stdenv.hostPlatform.gcc.thumb or true; }; } diff --git a/pkgs/by-name/su/surrealist/package.nix b/pkgs/by-name/su/surrealist/package.nix index 53290ea042c7..0c1e0abd1e57 100644 --- a/pkgs/by-name/su/surrealist/package.nix +++ b/pkgs/by-name/su/surrealist/package.nix @@ -166,8 +166,5 @@ in stdenv.mkDerivation (finalAttrs: { mainProgram = "surrealist"; maintainers = with maintainers; [ frankp ]; platforms = platforms.linux; - # See comment about wasm32-unknown-unknown in rustc.nix. - broken = lib.any (a: lib.hasAttr a stdenv.hostPlatform.gcc) [ "cpu" "float-abi" "fpu" ] || - !stdenv.hostPlatform.gcc.thumb or true; }; }) diff --git a/pkgs/by-name/te/tetrio-desktop/tetrio-plus.nix b/pkgs/by-name/te/tetrio-desktop/tetrio-plus.nix index c01bc623c9d9..0ee89e9e037b 100644 --- a/pkgs/by-name/te/tetrio-desktop/tetrio-plus.nix +++ b/pkgs/by-name/te/tetrio-desktop/tetrio-plus.nix @@ -78,9 +78,6 @@ let license = lib.licenses.mit; maintainers = with lib.maintainers; [ huantian wackbyte ]; platforms = lib.platforms.linux; - # See comment about wasm32-unknown-unknown in rustc.nix. - broken = lib.any (a: lib.hasAttr a stdenv.hostPlatform.gcc) [ "cpu" "float-abi" "fpu" ] || - !stdenv.hostPlatform.gcc.thumb or true; }; }; diff --git a/pkgs/development/compilers/rust/rustc.nix b/pkgs/development/compilers/rust/rustc.nix index 2bfa5b8ca6f2..1a7e22363acb 100644 --- a/pkgs/development/compilers/rust/rustc.nix +++ b/pkgs/development/compilers/rust/rustc.nix @@ -106,9 +106,7 @@ in stdenv.mkDerivation (finalAttrs: { stdenv.targetPlatform.rust.rustcTargetSpec # Other targets that don't need any extra dependencies to build. - # 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) [ + ] ++ optionals (!fastCross) [ "wasm32-unknown-unknown" # (build!=target): When cross-building a compiler we need to add diff --git a/pkgs/servers/ldap/lldap/default.nix b/pkgs/servers/ldap/lldap/default.nix index 7db37e57c2d2..80d7710ccbaf 100644 --- a/pkgs/servers/ldap/lldap/default.nix +++ b/pkgs/servers/ldap/lldap/default.nix @@ -5,7 +5,6 @@ , nixosTests , rustPlatform , rustc -, stdenv , wasm-bindgen-cli , wasm-pack , which @@ -85,9 +84,6 @@ in rustPlatform.buildRustPackage (commonDerivationAttrs // { changelog = "https://github.com/lldap/lldap/blob/v${lldap.version}/CHANGELOG.md"; license = licenses.gpl3Only; platforms = platforms.linux; - # See comment about wasm32-unknown-unknown in rustc.nix. - broken = lib.any (a: lib.hasAttr a stdenv.hostPlatform.gcc) [ "cpu" "float-abi" "fpu" ] || - !stdenv.hostPlatform.gcc.thumb or true; maintainers = with maintainers; [ bendlas ]; mainProgram = "lldap"; }; diff --git a/pkgs/servers/teleport/generic.nix b/pkgs/servers/teleport/generic.nix index 94ca520964cd..84b57160d4fa 100644 --- a/pkgs/servers/teleport/generic.nix +++ b/pkgs/servers/teleport/generic.nix @@ -180,9 +180,6 @@ buildGoModule rec { platforms = platforms.unix; # go-libfido2 is broken on platforms with less than 64-bit because it defines an array # which occupies more than 31 bits of address space. - broken = stdenv.hostPlatform.parsed.cpu.bits < 64 || - # See comment about wasm32-unknown-unknown in rustc.nix. - lib.any (a: lib.hasAttr a stdenv.hostPlatform.gcc) [ "cpu" "float-abi" "fpu" ] || - !stdenv.hostPlatform.gcc.thumb or true; + broken = stdenv.hostPlatform.parsed.cpu.bits < 64; }; }