Files
dotfiles/overlays/x86-64-v3-workarounds.nix
T
2026-09-17 08:35:35 -04:00

21 lines
914 B
Nix

# Compatibility fixes for packages rebuilt with x86-64-v3.
#
# The v3 baseline enables instructions that expose source assumptions hidden
# by the generic x86-64 build. Keep compile fixes here, separate from test
# exclusions, until upstream or nixpkgs incorporates them.
_final: prev:
prev.lib.optionalAttrs ((prev.stdenv.hostPlatform.gcc.arch or null) == "x86-64-v3") {
deno =
let
librusty_v8 = prev.deno.passthru.librusty_v8.overrideAttrs (old: {
# Clang prohibits including its internal BMI2 header directly. The
# public umbrella supplies the same intrinsics with the required setup.
postPatch = (old.postPatch or "") + ''
substituteInPlace third_party/abseil-cpp/absl/container/internal/raw_hash_set.h \
--replace-fail "#include <bmi2intrin.h>" "#include <immintrin.h>"
'';
});
in
prev.deno.override { inherit librusty_v8; };
}