Skip to content

Commit

Permalink
Fix symbol separation on cross-compile builds
Browse files Browse the repository at this point in the history
  • Loading branch information
dktapps committed Dec 24, 2024
1 parent 4fca631 commit df70dca
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ fi
export CXX="g++"
#export AR="gcc-ar"
export RANLIB=ranlib
export STRIP="strip"
#fi

COMPILE_FOR_ANDROID=no
Expand Down Expand Up @@ -459,6 +460,7 @@ if [ "$TOOLCHAIN_PREFIX" != "" ]; then
export RANLIB="$TOOLCHAIN_PREFIX-ranlib"
export CPP="$TOOLCHAIN_PREFIX-cpp"
export LD="$TOOLCHAIN_PREFIX-ld"
export STRIP="$TOOLCHAIN_PREFIX-strip"
fi

echo "#include <stdio.h>" > test.c
Expand Down Expand Up @@ -1376,7 +1378,7 @@ function separate_symbols {
output_dirname="$SYMBOLS_DIR/$(dirname $libname)"
mkdir -p "$output_dirname" >> "$DIR/install.log" 2>&1
cp "$libname" "$SYMBOLS_DIR/$libname.debug" >> "$DIR/install.log" 2>&1
strip -S "$libname" >> "$DIR/install.log" 2>&1 || rm "$SYMBOLS_DIR/$libname.debug" #if this fails, this probably isn't an executable binary
"$STRIP" -S "$libname" >> "$DIR/install.log" 2>&1 || rm "$SYMBOLS_DIR/$libname.debug" #if this fails, this probably isn't an executable binary
}

if [ "$SEPARATE_SYMBOLS" != "no" ]; then
Expand Down

0 comments on commit df70dca

Please sign in to comment.