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.
This commit is contained in:
parent
ddc356c1f0
commit
bf13eca852
|
@ -92,5 +92,8 @@ rustPlatform.buildRustPackage rec {
|
|||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ akru andresilva FlorianFranzen RaghavSood ];
|
||||
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;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -120,6 +120,9 @@ 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";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -126,5 +126,8 @@ 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;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -192,5 +192,8 @@ 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;
|
||||
};
|
||||
})
|
||||
|
|
|
@ -78,6 +78,9 @@ 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;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -84,6 +84,9 @@ 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";
|
||||
};
|
||||
|
|
|
@ -180,6 +180,9 @@ 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;
|
||||
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;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user