Skip to content

Commit

Permalink
x264: fix runtime crash due to llvm-strip args
Browse files Browse the repository at this point in the history
This is a similar issue to NixOS#234868,
but it crashes instead of failing to link. The same fix applies (using
`-S` instead of `-x` with `llvm-strip`).
  • Loading branch information
reckenrode committed Dec 1, 2023
1 parent 1247052 commit 0f0b89f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkgs/development/libraries/x264/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ stdenv.mkDerivation rec {

postPatch = ''
patchShebangs .
''
# Darwin uses `llvm-strip`, which results in a crash at runtime in assembly-based routines when `-x` is specified.
+ lib.optionalString stdenv.isDarwin ''
substituteInPlace Makefile --replace '$(if $(STRIP), $(STRIP) -x $@)' '$(if $(STRIP), $(STRIP) -S $@)'
'';

enableParallelBuilding = true;
Expand Down

0 comments on commit 0f0b89f

Please sign in to comment.