2021-10-22 00:13:40 +00:00
|
|
|
#!/bin/bash -ex
|
|
|
|
|
2023-08-06 14:49:37 +00:00
|
|
|
# TOPDIR="$(dirname "$0")"
|
2021-10-22 00:13:40 +00:00
|
|
|
|
2023-08-06 14:49:37 +00:00
|
|
|
# git config user.name "github-actions"
|
|
|
|
# git config user.email "github-actions[bot]@users.noreply.github.com"
|
2022-07-08 04:16:43 +00:00
|
|
|
#git am "$TOPDIR"/../patches/*.patch
|
2021-10-22 00:13:40 +00:00
|
|
|
|
2021-12-27 01:10:00 +00:00
|
|
|
CFLAGS="-ftree-vectorize -flto"
|
|
|
|
if [[ "$(uname -m)" == "aarch64" ]]; then
|
|
|
|
CFLAGS="$CFLAGS -march=armv8-a+crc+crypto"
|
2022-06-08 01:19:16 +00:00
|
|
|
elif [[ "$(uname -m)" == "x86_64" ]]; then
|
|
|
|
# those three of you still using Prescott should just compile this yourselves
|
|
|
|
CFLAGS="$CFLAGS -march=core2 -mtune=intel"
|
2021-12-27 01:10:00 +00:00
|
|
|
fi
|
2021-12-27 02:30:33 +00:00
|
|
|
if [[ "$USE_CCACHE" != '0' ]]; then
|
|
|
|
echo '[+] Enabled ccache'
|
|
|
|
ccache -s
|
|
|
|
export CC='/usr/lib/ccache/gcc'
|
|
|
|
export CXX='/usr/lib/ccache/g++'
|
|
|
|
fi
|
|
|
|
|
2021-12-27 01:10:00 +00:00
|
|
|
export CFLAGS
|
2021-10-22 00:13:40 +00:00
|
|
|
export CXXFLAGS="$CFLAGS"
|
2022-06-08 01:19:16 +00:00
|
|
|
export LDFLAGS="-flto -fuse-linker-plugin -fuse-ld=gold"
|
2021-10-22 00:13:40 +00:00
|
|
|
|
|
|
|
mkdir -p build && cd build
|
2023-08-06 14:49:37 +00:00
|
|
|
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DENABLE_SDL2=OFF -DENABLE_QT=OFF \
|
|
|
|
-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=OFF -DUSE_DISCORD_PRESENCE=OFF \
|
|
|
|
-DENABLE_FFMPEG_VIDEO_DUMPER=OFF -DUSE_SYSTEM_OPENSSL=ON -DCITRA_WARNINGS_AS_ERRORS=OFF -DENABLE_LTO=ON
|
2021-10-22 00:13:40 +00:00
|
|
|
ninja citra-room
|
|
|
|
strip ./bin/Release/citra-room
|