Skip to content

Commit

Permalink
Enable optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
licy183 committed Dec 31, 2023
1 parent 9cc523e commit 1f5fabd
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ popd
mkdir -p $_TMP_DIR/newer-toolchain
cp -R $_TMP_DIR/standalone-toolchain/sysroot $_TMP_DIR/newer-toolchain/

# Set CPPFLAGS/CFLAGS/CXXFLAGS
export CPPFLAGS="-O3 -g0"
export CFLAGS="$CPPFLAGS"
export CXXFLAGS="$CPPFLAGS"

# Build binutils
mkdir -p binutils-build
pushd binutils-build
Expand All @@ -109,9 +114,9 @@ export PATH="$_TMP_DIR/newer-toolchain/bin:$PATH"
mkdir -p newer-toolchain-build
pushd newer-toolchain-build

export CFLAGS="-D__ANDROID_API__=$_API_LEVEL"
export CPPFLAGS="-D__ANDROID_API__=$_API_LEVEL"
export CXXFLAGS="-D__ANDROID_API__=$_API_LEVEL"
export CFLAGS+=" -D__ANDROID_API__=$_API_LEVEL"
export CPPFLAGS+=" -D__ANDROID_API__=$_API_LEVEL"
export CXXFLAGS+=" -D__ANDROID_API__=$_API_LEVEL"

$GCC_SRC_DIR/configure \
--host=x86_64-linux-gnu \
Expand Down

0 comments on commit 1f5fabd

Please sign in to comment.