MacOS下无法对PHP扩展进行strip的问题

如果我们使用MacOS自带的strip命令,那么回报这个错误:

1
2
strip test.so
/Library/Developer/CommandLineTools/usr/bin/strip: error: symbols referenced by indirect symbol table entries that can't be stripped in: test.so

我们需要用llvm-strip来进行strip

1
llvm-strip test.so