build: Fix non-PCH build on Linux and add non-PCH verification to CI. (#7351)

This commit is contained in:
Steveice10 2024-01-13 19:58:09 -08:00 committed by GitHub
parent 72c1075402
commit cca8c08a9a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 4 deletions

View file

@ -1,7 +1,11 @@
#!/bin/bash -ex #!/bin/bash -ex
if [ "$TARGET" = "appimage" ]; then 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 fi
mkdir build && cd build mkdir build && cd build
@ -9,7 +13,7 @@ cmake .. -G Ninja \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \ -DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
"${COMPILER_FLAGS[@]}" \ "${EXTRA_CMAKE_FLAGS[@]}" \
-DENABLE_QT_TRANSLATION=ON \ -DENABLE_QT_TRANSLATION=ON \
-DCITRA_ENABLE_COMPATIBILITY_REPORTING=ON \ -DCITRA_ENABLE_COMPATIBILITY_REPORTING=ON \
-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON \ -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON \

View file

@ -4,6 +4,7 @@
#include <gamemode_client.h> #include <gamemode_client.h>
#include "common/linux/gamemode.h" #include "common/linux/gamemode.h"
#include "common/logging/log.h"
#include "common/settings.h" #include "common/settings.h"
namespace Common::Linux { namespace Common::Linux {

View file

@ -7,6 +7,7 @@
#include <cryptopp/base64.h> #include <cryptopp/base64.h>
#include <cryptopp/hmac.h> #include <cryptopp/hmac.h>
#include <cryptopp/sha.h> #include <cryptopp/sha.h>
#include <fmt/format.h>
#include "common/archives.h" #include "common/archives.h"
#include "common/common_paths.h" #include "common/common_paths.h"
#include "common/file_util.h" #include "common/file_util.h"
@ -25,7 +26,6 @@
#include "core/hle/service/cecd/cecd_s.h" #include "core/hle/service/cecd/cecd_s.h"
#include "core/hle/service/cecd/cecd_u.h" #include "core/hle/service/cecd/cecd_u.h"
#include "core/hle/service/cfg/cfg.h" #include "core/hle/service/cfg/cfg.h"
#include "fmt/format.h"
SERVICE_CONSTRUCT_IMPL(Service::CECD::Module) SERVICE_CONSTRUCT_IMPL(Service::CECD::Module)
SERIALIZE_EXPORT_IMPL(Service::CECD::Module) SERIALIZE_EXPORT_IMPL(Service::CECD::Module)

View file

@ -2,9 +2,9 @@
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include <fmt/format.h>
#include "core/hle/service/nwm/nwm_uds.h" #include "core/hle/service/nwm/nwm_uds.h"
#include "core/hle/service/nwm/uds_connection.h" #include "core/hle/service/nwm/uds_connection.h"
#include "fmt/format.h"
namespace Service::NWM { namespace Service::NWM {