Skip to content

Commit

Permalink
Give up on LTO [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
jfirebaugh committed Aug 9, 2018
1 parent 32030ab commit ad94d96
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions scripts/sqlite/3.24.0-min-size/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,7 @@ function mason_load_source {
function mason_compile {
# Note: setting CFLAGS overrides the default in sqlite of `-g -O2`
# hence we add back the preferred optimization
export CFLAGS="${CFLAGS} -Os -flto -fPIC -DNDEBUG"
export LDFLAGS="${LDFLAGS} -flto -fPIC"

# We need to use -O2 rather than -Os in LDFLAGS because of
# a toolchain issue: https://github.com/android-ndk/ndk/issues/721
if [ ${MASON_PLATFORM} == "linux" ] || [ ${MASON_PLATFORM} == "android" ]; then
export LDFLAGS="${LDFLAGS} -O2"
fi

if [ ${MASON_PLATFORM} == "linux" ] && [ ${MASON_PLATFORM_VERSION} == "x86_64" ]; then
export LDFLAGS="${LDFLAGS} -fuse-ld=gold"
fi

./configure \
CFLAGS="${CFLAGS} -Os -DNDEBUG" ./configure \
--prefix=${MASON_PREFIX} \
${MASON_HOST_ARG} \
--enable-static \
Expand Down

0 comments on commit ad94d96

Please sign in to comment.