From ec4671d20ea12882df4a72886ae238a774986bea Mon Sep 17 00:00:00 2001 From: Levon Date: Mon, 26 Feb 2024 18:44:01 -0600 Subject: [PATCH] mcpu --- scripts/build.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index 046be35..3eceba7 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -23,6 +23,9 @@ export COMP_FLAGS="" if [[ "$ARCH" == "x86_64" ]] then COMP_FLAGS="-march=native" +elif [[ "$ARCH" == "aarch64" ]] +then + COMP_FLAGS="-mcpu=native" fi echo "COMP_FLAGS: $COMP_FLAGS" @@ -37,7 +40,8 @@ mkdir build cd build || exit make clean cmake .. -DCMAKE_BUILD_TYPE=Release -DSVT_AV1_LTO=ON \ - -DCMAKE_C_FLAGS="-O3 $COMP_FLAGS" || exit + -DCMAKE_C_FLAGS="-O3 $COMP_FLAGS" \ + -DCMAKE_CXX_FLAGS="-O3 $COMP_FLAGS" || exit make -j "$(nproc)" || exit sudo make install || exit @@ -62,7 +66,8 @@ mkdir build cd build || exit make clean cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON \ - -DCMAKE_C_FLAGS="-flto -O3 $COMP_FLAGS" || exit + -DCMAKE_C_FLAGS="-flto -O3 $COMP_FLAGS" \ + -DCMAKE_CXX_FLAGS="-flto -O3 $COMP_FLAGS" || exit make -j "$(nproc)" || exit sudo make install || exit