Merge pull request #243440 from tjni/bootstrap-tools-test

stdenvBootstrapTools: in darwin, only run install_name_tool on Mach-O files
This commit is contained in:
Weijia Wang 2023-07-15 12:33:35 +02:00 committed by GitHub
commit 4a6c701720
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -151,7 +151,7 @@ in rec {
# Strip executables even further # Strip executables even further
for i in $out/bin/*; do for i in $out/bin/*; do
if [[ ! -L $i ]]; then if [[ ! -L $i ]] && isMachO "$i"; then
chmod +w $i chmod +w $i
${stdenv.cc.targetPrefix}strip $i || true ${stdenv.cc.targetPrefix}strip $i || true
fi fi
@ -164,7 +164,7 @@ in rec {
done done
for i in $out/bin/*; do for i in $out/bin/*; do
if [[ ! -L "$i" ]]; then if [[ ! -L "$i" ]] && isMachO "$i"; then
${stdenv.cc.targetPrefix}install_name_tool -add_rpath '@executable_path/../lib' $i ${stdenv.cc.targetPrefix}install_name_tool -add_rpath '@executable_path/../lib' $i
fi fi
done done