Skip to content

Commit 5db6eff

Browse files
committed
Enable optimization
1 parent a4de4e1 commit 5db6eff

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

build.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ popd
9191
mkdir -p $_TMP_DIR/newer-toolchain
9292
cp -R $_TMP_DIR/standalone-toolchain/sysroot $_TMP_DIR/newer-toolchain/
9393

94+
# Set CPPFLAGS/CFLAGS/CXXFLAGS
95+
export CPPFLAGS="-O3 -g0"
96+
export CFLAGS="$CPPFLAGS"
97+
export CXXFLAGS="$CPPFLAGS"
98+
9499
# Build binutils
95100
mkdir -p binutils-build
96101
pushd binutils-build
@@ -109,9 +114,9 @@ export PATH="$_TMP_DIR/newer-toolchain/bin:$PATH"
109114
mkdir -p newer-toolchain-build
110115
pushd newer-toolchain-build
111116

112-
export CFLAGS="-D__ANDROID_API__=$_API_LEVEL"
113-
export CPPFLAGS="-D__ANDROID_API__=$_API_LEVEL"
114-
export CXXFLAGS="-D__ANDROID_API__=$_API_LEVEL"
117+
export CFLAGS+=" -D__ANDROID_API__=$_API_LEVEL"
118+
export CPPFLAGS+=" -D__ANDROID_API__=$_API_LEVEL"
119+
export CXXFLAGS+=" -D__ANDROID_API__=$_API_LEVEL"
115120

116121
$GCC_SRC_DIR/configure \
117122
--host=x86_64-linux-gnu \

0 commit comments

Comments
 (0)