From cca8c08a9a96c06c034e701de333e62a09787787 Mon Sep 17 00:00:00 2001 From: Steveice10 <1269164+Steveice10@users.noreply.github.com> Date: Sat, 13 Jan 2024 19:58:09 -0800 Subject: [PATCH] build: Fix non-PCH build on Linux and add non-PCH verification to CI. (#7351) --- .ci/linux.sh | 8 ++++++-- src/common/linux/gamemode.cpp | 1 + src/core/hle/service/cecd/cecd.cpp | 2 +- src/core/hle/service/nwm/uds_connection.cpp | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.ci/linux.sh b/.ci/linux.sh index 58912ba3e1..a9755ff341 100755 --- a/.ci/linux.sh +++ b/.ci/linux.sh @@ -1,7 +1,11 @@ #!/bin/bash -ex if [ "$TARGET" = "appimage" ]; then - export COMPILER_FLAGS=(-DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_LINKER=/etc/bin/ld.lld) + # Compile the AppImage we distribute with Clang. + export EXTRA_CMAKE_FLAGS=(-DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_LINKER=/etc/bin/ld.lld) +else + # For the linux-fresh verification target, verify compilation without PCH as well. + export EXTRA_CMAKE_FLAGS=(-DCITRA_USE_PRECOMPILED_HEADERS=OFF) fi mkdir build && cd build @@ -9,7 +13,7 @@ cmake .. -G Ninja \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_C_COMPILER_LAUNCHER=ccache \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ - "${COMPILER_FLAGS[@]}" \ + "${EXTRA_CMAKE_FLAGS[@]}" \ -DENABLE_QT_TRANSLATION=ON \ -DCITRA_ENABLE_COMPATIBILITY_REPORTING=ON \ -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON \ diff --git a/src/common/linux/gamemode.cpp b/src/common/linux/gamemode.cpp index 8876d8dc42..8d3e2934a6 100644 --- a/src/common/linux/gamemode.cpp +++ b/src/common/linux/gamemode.cpp @@ -4,6 +4,7 @@ #include #include "common/linux/gamemode.h" +#include "common/logging/log.h" #include "common/settings.h" namespace Common::Linux { diff --git a/src/core/hle/service/cecd/cecd.cpp b/src/core/hle/service/cecd/cecd.cpp index 9e34bf833a..b40bfec92f 100644 --- a/src/core/hle/service/cecd/cecd.cpp +++ b/src/core/hle/service/cecd/cecd.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #include "common/archives.h" #include "common/common_paths.h" #include "common/file_util.h" @@ -25,7 +26,6 @@ #include "core/hle/service/cecd/cecd_s.h" #include "core/hle/service/cecd/cecd_u.h" #include "core/hle/service/cfg/cfg.h" -#include "fmt/format.h" SERVICE_CONSTRUCT_IMPL(Service::CECD::Module) SERIALIZE_EXPORT_IMPL(Service::CECD::Module) diff --git a/src/core/hle/service/nwm/uds_connection.cpp b/src/core/hle/service/nwm/uds_connection.cpp index 0fd12a6c0b..96b317de2e 100644 --- a/src/core/hle/service/nwm/uds_connection.cpp +++ b/src/core/hle/service/nwm/uds_connection.cpp @@ -2,9 +2,9 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#include #include "core/hle/service/nwm/nwm_uds.h" #include "core/hle/service/nwm/uds_connection.h" -#include "fmt/format.h" namespace Service::NWM {