Skip to content

Commit 0f0b89f

Browse files
committed
x264: fix runtime crash due to llvm-strip args
This is a similar issue to #234868, but it crashes instead of failing to link. The same fix applies (using `-S` instead of `-x` with `llvm-strip`).
1 parent 1247052 commit 0f0b89f

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

pkgs/development/libraries/x264/default.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ stdenv.mkDerivation rec {
2828

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

3337
enableParallelBuilding = true;

0 commit comments

Comments
 (0)