-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove a couple assertions that will never be 100% gone with floating point precision. The code that handles when these conditions are true is sound. Don't link the release librive_pls_renderer.a into debug builds. Many classes have debug-only fields, so the debug and release binares are not compatible. Instead, strip the debug build. Diffs= 2c2ea4492 Rive Renderer fixes on iOS/debug (#5995) Co-authored-by: Chris Dalton <[email protected]>
- Loading branch information
1 parent
469ed77
commit b1cba70
Showing
5 changed files
with
96 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
236d788ea3cf8f184a026a1b69c14af60003169c | ||
2c2ea44922f91b784ec16549ce1cda0346438fd0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
37532d9b2ca672b36968aff9435b413d846f6d23 | ||
4bc1e5c1d5af8327b4d5afc8f53afd6d0a7a7d45 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/bash | ||
# usage: strip_static_lib.sh file.a | ||
# Borrowed from: | ||
# https://stackoverflow.com/questions/49630984/strip-remove-debug-symbols-and-archive-names-from-a-static-library | ||
set -e | ||
|
||
if [ -z "$1" ]; then | ||
echo "usage: strip_static_lib.sh file.a" | ||
exit 1 | ||
fi | ||
|
||
path=$(readlink -f "${BASH_SOURCE:-$0}") | ||
SCRIPT_DIR=$(dirname $path) | ||
TMP_DIR="$SCRIPT_DIR/strip_static_lib_tmp" | ||
|
||
if [ -d $TMP_DIR ]; then | ||
rm -rf $TMP_DIR | ||
fi | ||
|
||
BASENAME=${1##*/} | ||
LIB=$(realpath $1) | ||
|
||
mkdir $TMP_DIR | ||
cp $LIB $TMP_DIR | ||
pushd $TMP_DIR | ||
|
||
ar xv $BASENAME | ||
rm -f $BASENAME | ||
i=1000 | ||
for p in *.o ; do | ||
strip -Sx $p -o ${i}.o | ||
rm $p | ||
((i++)) | ||
done | ||
|
||
ar crus $BASENAME *.o | ||
mv $BASENAME $LIB | ||
|
||
popd | ||
rm -rf $TMP_DIR | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
path=$(readlink -f "${BASH_SOURCE:-$0}") | ||
SCRIPT_DIR=$(dirname $path) | ||
TMP_DIR="$SCRIPT_DIR/strip_static_lib_fat_tmp" | ||
|
||
BASENAME=${1##*/} | ||
LIB=$(realpath $1) | ||
shift | ||
|
||
if [ -d $TMP_DIR ]; then | ||
rm -rf $TMP_DIR | ||
fi | ||
|
||
mkdir $TMP_DIR | ||
cp $LIB $TMP_DIR | ||
pushd $TMP_DIR | ||
|
||
# Extract and strip each architecture. | ||
for ARCH in "$@" | ||
do | ||
lipo $BASENAME -thin $ARCH -output ${BASENAME}_${ARCH}.a | ||
$SCRIPT_DIR/strip_static_lib.sh ${BASENAME}_${ARCH}.a | ||
done | ||
|
||
# Repack the stripped libs. | ||
lipo -create ${BASENAME}_*.a -output $LIB | ||
|
||
popd | ||
rm -rf $TMP_DIR | ||
exit 0 |