In containerized AppImage build script allow CPM to be used with Clang
This commit is contained in:
parent
76516783d3
commit
4e6bf7e82e
1 changed files with 3 additions and 3 deletions
|
|
@ -49,7 +49,7 @@ mount -t overlay overlay -olowerdir=torzu-src-ro,upperdir=torzu-src-upper,workdi
|
||||||
EXTRA_COMPILE_FLAGS=""
|
EXTRA_COMPILE_FLAGS=""
|
||||||
EXTRA_CMAKE_FLAGS=""
|
EXTRA_CMAKE_FLAGS=""
|
||||||
if [ "$BUILD_USE_CLANG" = 1 ]; then
|
if [ "$BUILD_USE_CLANG" = 1 ]; then
|
||||||
EXTRA_CMAKE_FLAGS="$EXTRA_CMAKE_FLAGS -DCMAKE_C_COMPILER=clang-19 -DCMAKE_CXX_COMPILER=clang++-19"
|
EXTRA_CMAKE_FLAGS="-DCMAKE_C_COMPILER=clang-19 -DCMAKE_CXX_COMPILER=clang++-19"
|
||||||
FATLTO_FLAG="-flto=full"
|
FATLTO_FLAG="-flto=full"
|
||||||
else
|
else
|
||||||
FATLTO_FLAG="-flto"
|
FATLTO_FLAG="-flto"
|
||||||
|
|
@ -61,14 +61,14 @@ if [ "$BUILD_USE_FAT_LTO" = 1 ]; then
|
||||||
EXTRA_COMPILE_FLAGS="$FATLTO_FLAG"
|
EXTRA_COMPILE_FLAGS="$FATLTO_FLAG"
|
||||||
fi
|
fi
|
||||||
if [ "$BUILD_USE_CPM" = 1 ]; then
|
if [ "$BUILD_USE_CPM" = 1 ]; then
|
||||||
EXTRA_CMAKE_FLAGS="-DYUZU_USE_CPM=ON"
|
EXTRA_CMAKE_FLAGS="$EXTRA_CMAKE_FLAGS -DYUZU_USE_CPM=ON"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Build Torzu
|
# Build Torzu
|
||||||
cd /tmp
|
cd /tmp
|
||||||
mkdir torzu-build
|
mkdir torzu-build
|
||||||
cd torzu-build
|
cd torzu-build
|
||||||
cmake /tmp/torzu-src -GNinja -DCMAKE_BUILD_TYPE=Release -DYUZU_TESTS=OFF -DENABLE_QT_TRANSLATION=OFF -DSPIRV_WERROR=OFF -DCMAKE_FIND_LIBRARY_SUFFIXES=".a;.so" -DSPIRV-Headers_SOURCE_DIR=/tmp/torzu-src/externals/SPIRV-Headers -DCMAKE_{C,CXX}_FLAGS="${EXTRA_COMPILE_FLAGS} -fdata-sections -ffunction-sections" -DCMAKE_{EXE,SHARED}_LINKER_FLAGS="-Wl,--gc-sections" $EXTRA_CMAKE_FLAGS
|
cmake /tmp/torzu-src -GNinja -DCMAKE_BUILD_TYPE=Release -DYUZU_TESTS=OFF -DENABLE_QT_TRANSLATION=OFF -DSPIRV_WERROR=OFF -DCMAKE_FIND_LIBRARY_SUFFIXES=".a;.so" -DSPIRV-Headers_SOURCE_DIR=/tmp/torzu-src/externals/SPIRV-Headers -DCMAKE_{C,CXX}_FLAGS="$EXTRA_COMPILE_FLAGS -fdata-sections -ffunction-sections" -DCMAKE_{EXE,SHARED}_LINKER_FLAGS="-Wl,--gc-sections" $EXTRA_CMAKE_FLAGS
|
||||||
ninja || (
|
ninja || (
|
||||||
echo "Compilation has failed. Dropping you into a shell so you can inspect the situation. Run 'ninja' to retry and exit shell once compilation has finished successfully."
|
echo "Compilation has failed. Dropping you into a shell so you can inspect the situation. Run 'ninja' to retry and exit shell once compilation has finished successfully."
|
||||||
echo "Note that any changes made here will not be reflected to the host environment, but changes made from the host environment will be reflected here."
|
echo "Note that any changes made here will not be reflected to the host environment, but changes made from the host environment will be reflected here."
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue