0
0
mirror of https://notabug.org/litucks/torzu.git synced 2025-04-24 09:05:13 +00:00

Allow Yuzu to be built using Clang-CL for better compiler optimizations for Windows

Also updates Boost to 1.88.0
This commit is contained in:
spectranator 2025-04-12 18:44:18 +02:00
parent 709f70a3b2
commit a640bbee41
49 changed files with 349 additions and 199 deletions

View File

@ -10,13 +10,14 @@ apt -y install libfmt-dev libenet-dev liblz4-dev nlohmann-json3-dev zlib1g-dev l
# Install correct version of boost # Install correct version of boost
cd /tmp cd /tmp
wget https://web.archive.org/web/20241120101759id_/https://boostorg.jfrog.io/artifactory/main/release/1.84.0/source/boost_1_84_0.tar.bz2 wget https://archives.boost.io/release/1.88.0/source/boost_1_88_0.tar.bz2
tar xf boost_1_84_0.tar.bz2 echo "Extracting Boost sources..."
cd boost_1_84_0 tar xf boost_1_88_0.tar.bz2
cd boost_1_88_0
./bootstrap.sh ./bootstrap.sh
./b2 install --with-{headers,context} link=static ./b2 install --with-{headers,context} link=static
cd .. cd ..
rm -rf boost_1_84_0 rm -rf boost_1_88_0
# Build Torzu # Build Torzu
cd /tmp cd /tmp

View File

@ -85,10 +85,78 @@ option(YUZU_ENABLE_PORTABLE "Allow yuzu to enable portable mode if a user folder
option(YUZU_USE_LLVM_DEMANGLE "Use LLVM Demangle" ON) option(YUZU_USE_LLVM_DEMANGLE "Use LLVM Demangle" ON)
option(YUZU_NO_PRECOMPILED_HEADERS "Do not precompile headers" OFF)
CMAKE_DEPENDENT_OPTION(YUZU_USE_FASTER_LD "Check if a faster linker is available" ON "NOT WIN32" OFF) CMAKE_DEPENDENT_OPTION(YUZU_USE_FASTER_LD "Check if a faster linker is available" ON "NOT WIN32" OFF)
CMAKE_DEPENDENT_OPTION(USE_SYSTEM_MOLTENVK "Use the system MoltenVK lib (instead of the bundled one)" OFF "APPLE" OFF) CMAKE_DEPENDENT_OPTION(USE_SYSTEM_MOLTENVK "Use the system MoltenVK lib (instead of the bundled one)" OFF "APPLE" OFF)
if (YUZU_NO_PRECOMPILED_HEADERS)
function (target_precompile_headers)
# Do nothing instead
endfunction()
endif()
# Detect current compilation architecture and create standard definitions
# =======================================================================
include(CheckSymbolExists)
function(detect_architecture symbol arch)
if (NOT DEFINED ARCHITECTURE)
set(CMAKE_REQUIRED_QUIET 1)
check_symbol_exists("${symbol}" "" ARCHITECTURE_${arch})
unset(CMAKE_REQUIRED_QUIET)
# The output variable needs to be unique across invocations otherwise
# CMake's crazy scope rules will keep it defined
if (ARCHITECTURE_${arch})
set(ARCHITECTURE "${arch}" PARENT_SCOPE)
set(ARCHITECTURE_${arch} 1 PARENT_SCOPE)
add_definitions(-DARCHITECTURE_${arch}=1)
endif()
endif()
endfunction()
if (NOT ENABLE_GENERIC)
if (MSVC)
detect_architecture("_M_AMD64" x86_64)
detect_architecture("_M_IX86" x86)
detect_architecture("_M_ARM" arm)
detect_architecture("_M_ARM64" arm64)
else()
detect_architecture("__x86_64__" x86_64)
detect_architecture("__i386__" x86)
detect_architecture("__arm__" arm)
detect_architecture("__aarch64__" arm64)
endif()
endif()
if (NOT DEFINED ARCHITECTURE)
set(ARCHITECTURE "GENERIC")
set(ARCHITECTURE_GENERIC 1)
add_definitions(-DARCHITECTURE_GENERIC=1)
endif()
message(STATUS "Target architecture: ${ARCHITECTURE} (${YUZU_MARCH})")
if (MSVC AND NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set(YUZU_MARCH "SSE4.2" CACHE STRING "Compile for specified x86 arch (AVX, AVX2, etc.)")
add_compile_options(/arch:${YUZU_MARCH})
else()
if (ARCHITECTURE STREQUAL "x86_64")
set(YUZU_MARCH "x86-64-v2" CACHE STRING "Compile for specified x86 microarchitecture level (x86-64-v3, native, etc.)")
add_compile_options(-march=${YUZU_MARCH})
elseif (ARCHITECTURE STREQUAL "arm64")
set(YUZU_MARCH "armv8-a" CACHE STRING "Compile for specified ARM architecture (armv8.1-a, native, etc.)")
add_compile_options(-march=${YUZU_MARCH})
else()
message(WARNING "Architecture ${ARCHITECTURE} unknown, EXPECT THINGS TO GO WRONG.")
endif()
endif()
if (MSVC)
add_definitions(-DWIN32)
endif()
set(DEFAULT_ENABLE_OPENSSL ON) set(DEFAULT_ENABLE_OPENSSL ON)
if (ANDROID OR WIN32 OR APPLE) if (ANDROID OR WIN32 OR APPLE)
# - Windows defaults to the Schannel backend. # - Windows defaults to the Schannel backend.
@ -244,46 +312,6 @@ if (NOT EXISTS ${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.
file(WRITE ${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.json "") file(WRITE ${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.json "")
endif() endif()
# Detect current compilation architecture and create standard definitions
# =======================================================================
include(CheckSymbolExists)
function(detect_architecture symbol arch)
if (NOT DEFINED ARCHITECTURE)
set(CMAKE_REQUIRED_QUIET 1)
check_symbol_exists("${symbol}" "" ARCHITECTURE_${arch})
unset(CMAKE_REQUIRED_QUIET)
# The output variable needs to be unique across invocations otherwise
# CMake's crazy scope rules will keep it defined
if (ARCHITECTURE_${arch})
set(ARCHITECTURE "${arch}" PARENT_SCOPE)
set(ARCHITECTURE_${arch} 1 PARENT_SCOPE)
add_definitions(-DARCHITECTURE_${arch}=1)
endif()
endif()
endfunction()
if (NOT ENABLE_GENERIC)
if (MSVC)
detect_architecture("_M_AMD64" x86_64)
detect_architecture("_M_IX86" x86)
detect_architecture("_M_ARM" arm)
detect_architecture("_M_ARM64" arm64)
else()
detect_architecture("__x86_64__" x86_64)
detect_architecture("__i386__" x86)
detect_architecture("__arm__" arm)
detect_architecture("__aarch64__" arm64)
endif()
endif()
if (NOT DEFINED ARCHITECTURE)
set(ARCHITECTURE "GENERIC")
set(ARCHITECTURE_GENERIC 1)
add_definitions(-DARCHITECTURE_GENERIC=1)
endif()
message(STATUS "Target architecture: ${ARCHITECTURE}")
if (UNIX) if (UNIX)
add_definitions(-DYUZU_UNIX=1) add_definitions(-DYUZU_UNIX=1)
@ -317,7 +345,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
# Enforce the search mode of non-required packages for better and shorter failure messages # Enforce the search mode of non-required packages for better and shorter failure messages
if (NOT YUZU_USE_CPM) if (NOT YUZU_USE_CPM)
find_package(Boost 1.79.0 REQUIRED context) find_package(Boost 1.86.0 REQUIRED context)
find_package(enet 1.3 MODULE) find_package(enet 1.3 MODULE)
find_package(fmt REQUIRED) find_package(fmt REQUIRED)
if (YUZU_USE_LLVM_DEMANGLE) if (YUZU_USE_LLVM_DEMANGLE)
@ -335,10 +363,20 @@ if (NOT YUZU_USE_CPM)
else() else()
include(CMakeModules/CPM.cmake) include(CMakeModules/CPM.cmake)
# Disable tests in all externals supporting the standard option name
set(BUILD_TESTING OFF)
# Build only static externals
set(BUILD_SHARED_LIBS OFF)
# Do not attempt to use Brotli in httplib since we're not downloading it
set(HTTPLIB_USE_BROTLI_IF_AVAILABLE OFF)
message(STATUS "Downloading and extracting boost library sources. This will take some time...") message(STATUS "Downloading and extracting boost library sources. This will take some time...")
CPMAddPackage( CPMAddPackage(
NAME boost NAME boost
URL "https://github.com/boostorg/boost/releases/download/boost-1.88.0/boost-1.88.0-cmake.7z" URL "https://github.com/boostorg/boost/releases/download/boost-1.88.0/boost-1.88.0-cmake.7z"
PATCHES boost-1.88.0-fix.patch
VERSION 1.88.0 VERSION 1.88.0
) )
CPMAddPackage("gh:lsalzman/enet@1.3.18") CPMAddPackage("gh:lsalzman/enet@1.3.18")
@ -363,12 +401,20 @@ else()
) )
add_subdirectory(${zstd_SOURCE_DIR}/build/cmake zstd) add_subdirectory(${zstd_SOURCE_DIR}/build/cmake zstd)
CPMAddPackage("gh:KhronosGroup/SPIRV-Headers#vulkan-sdk-1.3.280.0") CPMAddPackage("gh:KhronosGroup/SPIRV-Headers#vulkan-sdk-1.3.280.0")
CPMAddPackage("gh:yhirose/cpp-httplib@0.20.0")
# Set up required aliases # Set up required aliases
add_library(enet::enet ALIAS enet)
add_library(Opus::opus ALIAS opus) add_library(Opus::opus ALIAS opus)
add_library(lz4::lz4 ALIAS lz4) add_library(lz4::lz4 ALIAS lz4)
add_library(zstd::zstd ALIAS libzstd) add_library(zstd::zstd ALIAS libzstd)
add_library(zstd::libzstd ALIAS libzstd)
add_library(nlohmann::json ALIAS nlohmann_json)
# Enet specific setup to add missing include dir
add_library(enet_fixed INTERFACE)
target_link_libraries(enet_fixed INTERFACE enet)
target_include_directories(enet_fixed INTERFACE ${enet_SOURCE_DIR}/include)
add_library(enet::enet ALIAS enet_fixed)
endif() endif()
if (NOT YUZU_USE_EXTERNAL_VULKAN_HEADERS) if (NOT YUZU_USE_EXTERNAL_VULKAN_HEADERS)
@ -422,7 +468,6 @@ endif()
if (ENABLE_WEB_SERVICE) if (ENABLE_WEB_SERVICE)
find_package(cpp-jwt 1.4 CONFIG) find_package(cpp-jwt 1.4 CONFIG)
find_package(httplib 0.12 MODULE COMPONENTS OpenSSL)
endif() endif()
if (YUZU_TESTS) if (YUZU_TESTS)
@ -596,6 +641,10 @@ if(ENABLE_QT)
if (DEFINED QT_BUILD) if (DEFINED QT_BUILD)
download_bundled_external("qt/" ${QT_BUILD} QT_PREFIX) download_bundled_external("qt/" ${QT_BUILD} QT_PREFIX)
execute_process(COMMAND chmod +x ${QT_PREFIX}/bin/moc.exe ERROR_QUIET)
execute_process(COMMAND chmod +x ${QT_PREFIX}/bin/uic.exe ERROR_QUIET)
execute_process(COMMAND chmod +x ${QT_PREFIX}/bin/rcc.exe ERROR_QUIET)
execute_process(COMMAND chmod +x ${QT_PREFIX}/bin/lrelease.exe ERROR_QUIET)
endif() endif()
set(QT_PREFIX_HINT HINTS "${QT_PREFIX}") set(QT_PREFIX_HINT HINTS "${QT_PREFIX}")
@ -775,6 +824,59 @@ if (MSVC AND CMAKE_GENERATOR STREQUAL "Ninja")
) )
endif() endif()
# Adjustments for Clang-cl
if (MSVC AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND ARCHITECTURE STREQUAL "x86_64")
set(LLVM_MINGW_VERSION 20250402)
# Set download URL and library path within the ZIP
set(ZIP_URL "https://github.com/mstorsjo/llvm-mingw/releases/download/${LLVM_MINGW_VERSION}/llvm-mingw-${LLVM_MINGW_VERSION}-ucrt-x86_64.zip")
set(LIB_PATH "llvm-mingw-${LLVM_MINGW_VERSION}-ucrt-x86_64/lib/clang/20/lib/windows/libclang_rt.builtins-x86_64.a")
# Set paths for download and extraction
set(DOWNLOAD_DIR "${CMAKE_BINARY_DIR}/llvm-mingw-download")
set(ZIP_FILE "${DOWNLOAD_DIR}/llvm-mingw.zip")
set(EXTRACTED_LIB "${DOWNLOAD_DIR}/${LIB_PATH}")
# Create download directory if it doesn't exist
file(MAKE_DIRECTORY "${DOWNLOAD_DIR}")
# Download and extract if the library doesn't exist
if(NOT EXISTS "${EXTRACTED_LIB}")
message(STATUS "Downloading llvm-mingw runtime libraries...")
# Download the ZIP file
file(DOWNLOAD
${ZIP_URL}
${ZIP_FILE}
SHOW_PROGRESS
# Uncomment and add EXPECTED_HASH if you know the SHA256 checksum
EXPECTED_HASH SHA256=4edc13d878b4ec49c2f1a6e9161abb093bbaefc8b7d129f3b3f57a22a4a41d38
)
message(STATUS "Extracting compiler-rt builtins library...")
# Extract the specific file from the ZIP
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar xvf "${ZIP_FILE}" "${LIB_PATH}"
WORKING_DIRECTORY "${DOWNLOAD_DIR}"
RESULT_VARIABLE extraction_result
)
if(NOT extraction_result EQUAL 0)
message(FATAL_ERROR "Failed to extract library: ${extraction_result}")
endif()
endif()
# Create imported target for the library
add_library(llvm-mingw-runtime STATIC IMPORTED)
set_target_properties(llvm-mingw-runtime PROPERTIES
IMPORTED_LOCATION "${EXTRACTED_LIB}"
)
# Link the library to all executables in the project
link_libraries(llvm-mingw-runtime)
endif()
if (YUZU_USE_FASTER_LD AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") if (YUZU_USE_FASTER_LD AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# We will assume that if the compiler is GCC, it will attempt to use ld.bfd by default. # We will assume that if the compiler is GCC, it will attempt to use ld.bfd by default.
# Try to pick a faster linker. # Try to pick a faster linker.

View File

@ -98,22 +98,22 @@ function(copy_yuzu_Qt5_deps target_dir)
"${Qt5_XCBGLINTEGRATIONS_DIR}libqxcb-glx-integration.so" "${Qt5_XCBGLINTEGRATIONS_DIR}libqxcb-glx-integration.so"
) )
foreach(LIB ${Qt5_DLLS}) foreach(LIB ${Qt5_DLLS})
file(COPY ${LIB} DESTINATION "${DLL_DEST}/lib" FOLLOW_SYMLINK_CHAIN) file(COPY "${LIB}" DESTINATION "${DLL_DEST}/lib" FOLLOW_SYMLINK_CHAIN)
endforeach() endforeach()
foreach(LIB ${Qt5_IMAGEFORMAT_DLLS}) foreach(LIB ${Qt5_IMAGEFORMAT_DLLS})
file(COPY ${LIB} DESTINATION "${DLL_DEST}plugins/imageformats/" FOLLOW_SYMLINK_CHAIN) file(COPY "${LIB}" DESTINATION "${DLL_DEST}plugins/imageformats/" FOLLOW_SYMLINK_CHAIN)
endforeach() endforeach()
foreach(LIB ${Qt5_PLATFORMTHEME_DLLS}) foreach(LIB ${Qt5_PLATFORMTHEME_DLLS})
file(COPY ${LIB} DESTINATION "${DLL_DEST}plugins/platformthemes/" FOLLOW_SYMLINK_CHAIN) file(COPY "${LIB}" DESTINATION "${DLL_DEST}plugins/platformthemes/" FOLLOW_SYMLINK_CHAIN)
endforeach() endforeach()
foreach(LIB ${Qt5_PLATFORM_DLLS}) foreach(LIB ${Qt5_PLATFORM_DLLS})
file(COPY ${LIB} DESTINATION "${DLL_DEST}plugins/platforms/" FOLLOW_SYMLINK_CHAIN) file(COPY "${LIB}" DESTINATION "${DLL_DEST}plugins/platforms/" FOLLOW_SYMLINK_CHAIN)
endforeach() endforeach()
foreach(LIB ${Qt5_PLATFORMINPUTCONTEXT_DLLS}) foreach(LIB ${Qt5_PLATFORMINPUTCONTEXT_DLLS})
file(COPY ${LIB} DESTINATION "${DLL_DEST}plugins/platforminputcontexts/" FOLLOW_SYMLINK_CHAIN) file(COPY "${LIB}" DESTINATION "${DLL_DEST}plugins/platforminputcontexts/" FOLLOW_SYMLINK_CHAIN)
endforeach() endforeach()
foreach(LIB ${Qt5_XCBGLINTEGRATION_DLLS}) foreach(LIB ${Qt5_XCBGLINTEGRATION_DLLS})
file(COPY ${LIB} DESTINATION "${DLL_DEST}plugins/xcbglintegrations/" FOLLOW_SYMLINK_CHAIN) file(COPY "${LIB}" DESTINATION "${DLL_DEST}plugins/xcbglintegrations/" FOLLOW_SYMLINK_CHAIN)
endforeach() endforeach()
endif() endif()

View File

@ -12,16 +12,25 @@ set(__windows_copy_files YES)
# Any number of files to copy from SOURCE_DIR to DEST_DIR can be specified after DEST_DIR. # Any number of files to copy from SOURCE_DIR to DEST_DIR can be specified after DEST_DIR.
# This copying happens post-build. # This copying happens post-build.
function(windows_copy_files TARGET SOURCE_DIR DEST_DIR) if (CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
# windows commandline expects the / to be \ so switch them function(windows_copy_files TARGET SOURCE_DIR DEST_DIR)
string(REPLACE "/" "\\\\" SOURCE_DIR ${SOURCE_DIR}) # windows commandline expects the / to be \ so switch them
string(REPLACE "/" "\\\\" DEST_DIR ${DEST_DIR}) string(REPLACE "/" "\\\\" SOURCE_DIR ${SOURCE_DIR})
string(REPLACE "/" "\\\\" DEST_DIR ${DEST_DIR})
# /NJH /NJS /NDL /NFL /NC /NS /NP - Silence any output # /NJH /NJS /NDL /NFL /NC /NS /NP - Silence any output
# cmake adds an extra check for command success which doesn't work too well with robocopy # cmake adds an extra check for command success which doesn't work too well with robocopy
# so trick it into thinking the command was successful with the || cmd /c "exit /b 0" # so trick it into thinking the command was successful with the || cmd /c "exit /b 0"
add_custom_command(TARGET ${TARGET} POST_BUILD add_custom_command(TARGET ${TARGET} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory ${DEST_DIR} COMMAND ${CMAKE_COMMAND} -E make_directory ${DEST_DIR}
COMMAND robocopy ${SOURCE_DIR} ${DEST_DIR} ${ARGN} /NJH /NJS /NDL /NFL /NC /NS /NP || cmd /c "exit /b 0" COMMAND robocopy ${SOURCE_DIR} ${DEST_DIR} ${ARGN} /NJH /NJS /NDL /NFL /NC /NS /NP || cmd /c "exit /b 0"
) )
endfunction() endfunction()
else()
function(windows_copy_files TARGET SOURCE_DIR DEST_DIR)
add_custom_command(TARGET ${TARGET} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory ${DEST_DIR}
COMMAND cp -ra ${SOURCE_DIR}/. ${DEST_DIR}
)
endfunction()
endif()

24
boost-1.88.0-fix.patch Normal file
View File

@ -0,0 +1,24 @@
diff -ruN boost-src/libs/cobalt/include/boost/cobalt/concepts.hpp boost-src-patched/libs/cobalt/include/boost/cobalt/concepts.hpp
--- boost-src/libs/cobalt/include/boost/cobalt/concepts.hpp 2025-04-12 18:25:53.791233755 +0200
+++ boost-src-patched/libs/cobalt/include/boost/cobalt/concepts.hpp 2025-04-12 18:29:50.304496166 +0200
@@ -62,7 +62,7 @@
template <typename T>
concept with_get_executor = requires (T& t)
{
- {t.get_executor()} -> asio::execution::executor;
+ t.get_executor();
};
diff -ruN boost-src/libs/context/CMakeLists.txt boost-src-patched/libs/context/CMakeLists.txt
--- boost-src/libs/context/CMakeLists.txt 2025-04-12 18:25:53.847233801 +0200
+++ boost-src-patched/libs/context/CMakeLists.txt 2025-04-12 18:29:33.436479899 +0200
@@ -189,7 +189,7 @@
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set_property(SOURCE ${ASM_SOURCES} APPEND PROPERTY COMPILE_OPTIONS "-x" "assembler-with-cpp")
- elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT MSVC)
set_property(SOURCE ${ASM_SOURCES} APPEND PROPERTY COMPILE_OPTIONS "-Wno-unused-command-line-argument")
endif()

View File

@ -182,32 +182,29 @@ endif()
# #
# Install # Install
# #
include(GNUInstallDirs) # Only try to install if boost wasn't included as submodule
include(CMakePackageConfigHelpers) if (NOT TARGET boost_headers)
include(GNUInstallDirs)
include(CMakePackageConfigHelpers)
# Hack to get CPM.cmake working with this (should be fine though) install(TARGETS dynarmic EXPORT dynarmicTargets)
set(BOOST_TARGET ) install(EXPORT dynarmicTargets
if (TARGET boost_headers) NAMESPACE dynarmic::
set(BOOST_TARGET boost_headers) DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/dynarmic"
)
configure_package_config_file(CMakeModules/dynarmicConfig.cmake.in
dynarmicConfig.cmake
INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/dynarmic"
)
write_basic_package_version_file(dynarmicConfigVersion.cmake
COMPATIBILITY SameMajorVersion
)
install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/dynarmicConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/dynarmicConfigVersion.cmake"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/dynarmic"
)
install(DIRECTORY src/dynarmic TYPE INCLUDE FILES_MATCHING PATTERN "*.h")
endif() endif()
install(TARGETS dynarmic ${BOOST_TARGET} EXPORT dynarmicTargets)
install(EXPORT dynarmicTargets
NAMESPACE dynarmic::
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/dynarmic"
)
configure_package_config_file(CMakeModules/dynarmicConfig.cmake.in
dynarmicConfig.cmake
INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/dynarmic"
)
write_basic_package_version_file(dynarmicConfigVersion.cmake
COMPATIBILITY SameMajorVersion
)
install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/dynarmicConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/dynarmicConfigVersion.cmake"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/dynarmic"
)
install(DIRECTORY src/dynarmic TYPE INCLUDE FILES_MATCHING PATTERN "*.h")

View File

@ -510,7 +510,7 @@ target_link_libraries(dynarmic
if (TARGET boost_headers) if (TARGET boost_headers)
target_link_libraries(dynarmic target_link_libraries(dynarmic
PRIVATE PRIVATE
boost_headers boost_headers boost_variant boost_icl
) )
else() else()
target_link_libraries(dynarmic target_link_libraries(dynarmic

View File

@ -57,8 +57,7 @@ if (MSVC)
/EHsc /EHsc
/Zc:throwingNew # Assumes new never returns null /Zc:throwingNew # Assumes new never returns null
/Zc:inline # Omits inline functions from object-file output /Zc:inline # Omits inline functions from object-file output
/DNOMINMAX /DNOMINMAX)
/WX)
if (CMAKE_VS_PLATFORM_TOOLSET MATCHES "LLVM-vs[0-9]+") if (CMAKE_VS_PLATFORM_TOOLSET MATCHES "LLVM-vs[0-9]+")
list(APPEND SIRIT_CXX_FLAGS list(APPEND SIRIT_CXX_FLAGS
@ -76,8 +75,7 @@ else()
-Wno-missing-braces -Wno-missing-braces
-Wconversion -Wconversion
-Wsign-conversion -Wsign-conversion
-Wshadow -Wshadow)
-Werror)
endif() endif()
# Enable unit-testing. # Enable unit-testing.

View File

@ -110,11 +110,17 @@ else()
add_compile_options( add_compile_options(
-fwrapv -fwrapv
-Werror=all # These cause issues with Boost, let's just set them to regular warnings instead (for now)
-Werror=extra #-Werror=all
-Werror=missing-declarations #-Werror=extra
-Werror=shadow #-Werror=missing-declarations
-Werror=unused #-Werror=shadow
#-Werror=unused
-Wall
-Wextra
-Wmissing-declarations
-Wshadow
-Wunused
-Wno-attributes -Wno-attributes
-Wno-invalid-offsetof -Wno-invalid-offsetof

View File

@ -53,7 +53,7 @@ add_library(audio_core STATIC
out/audio_out.h out/audio_out.h
out/audio_out_system.cpp out/audio_out_system.cpp
out/audio_out_system.h out/audio_out_system.h
precompiled_headers.h precompiled_headers.hpp
renderer/audio_device.cpp renderer/audio_device.cpp
renderer/audio_device.h renderer/audio_device.h
renderer/audio_renderer.h renderer/audio_renderer.h
@ -261,7 +261,7 @@ if (ANDROID)
endif() endif()
if (YUZU_USE_PRECOMPILED_HEADERS) if (YUZU_USE_PRECOMPILED_HEADERS)
target_precompile_headers(audio_core PRIVATE precompiled_headers.h) target_precompile_headers(audio_core PRIVATE precompiled_headers.hpp)
endif() endif()
create_target_directory_groups(audio_core) create_target_directory_groups(audio_core)

View File

@ -3,4 +3,4 @@
#pragma once #pragma once
#include "common/common_precompiled_headers.h" #include "common/common_precompiled_headers.hpp"

View File

@ -34,7 +34,7 @@ add_library(common STATIC
cityhash.cpp cityhash.cpp
cityhash.h cityhash.h
common_funcs.h common_funcs.h
common_precompiled_headers.h common_precompiled_headers.hpp
common_types.h common_types.h
concepts.h concepts.h
container_hash.h container_hash.h
@ -103,7 +103,7 @@ add_library(common STATIC
param_package.h param_package.h
parent_of_member.h parent_of_member.h
point.h point.h
precompiled_headers.h precompiled_headers.hpp
quaternion.h quaternion.h
range_map.h range_map.h
range_mutex.h range_mutex.h
@ -260,6 +260,9 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
endif() endif()
target_link_libraries(common PUBLIC Boost::context Boost::headers fmt::fmt microprofile stb::headers Threads::Threads) target_link_libraries(common PUBLIC Boost::context Boost::headers fmt::fmt microprofile stb::headers Threads::Threads)
if (YUZU_USE_CPM)
target_link_libraries(common PUBLIC Boost::icl)
endif()
target_link_libraries(common PRIVATE lz4::lz4 zstd::zstd LLVM::Demangle) target_link_libraries(common PRIVATE lz4::lz4 zstd::zstd LLVM::Demangle)
if (ANDROID) if (ANDROID)
@ -268,7 +271,7 @@ if (ANDROID)
endif() endif()
if (YUZU_USE_PRECOMPILED_HEADERS) if (YUZU_USE_PRECOMPILED_HEADERS)
target_precompile_headers(common PRIVATE precompiled_headers.h) target_precompile_headers(common PRIVATE precompiled_headers.hpp)
endif() endif()
create_target_directory_groups(common) create_target_directory_groups(common)

View File

@ -3,4 +3,4 @@
#pragma once #pragma once
#include "common/common_precompiled_headers.h" #include "common/common_precompiled_headers.hpp"

View File

@ -5,7 +5,11 @@
#include <utility> #include <utility>
#ifdef _MSC_VER #if defined(_MSC_VER) && !defined(__clang__)
#define MSV_BUT_NOT_CLANG
#endif
#ifdef MSV_BUT_NOT_CLANG
#include <intrin.h> #include <intrin.h>
#pragma intrinsic(__umulh) #pragma intrinsic(__umulh)
#pragma intrinsic(_umul128) #pragma intrinsic(_umul128)
@ -20,7 +24,7 @@ namespace Common {
// This function multiplies 2 u64 values and divides it by a u64 value. // This function multiplies 2 u64 values and divides it by a u64 value.
[[nodiscard]] static inline u64 MultiplyAndDivide64(u64 a, u64 b, u64 d) { [[nodiscard]] static inline u64 MultiplyAndDivide64(u64 a, u64 b, u64 d) {
#ifdef _MSC_VER #ifdef MSV_BUT_NOT_CLANG
u128 r{}; u128 r{};
r[0] = _umul128(a, b, &r[1]); r[0] = _umul128(a, b, &r[1]);
u64 remainder; u64 remainder;
@ -41,7 +45,7 @@ namespace Common {
// This function multiplies 2 u64 values and produces a u128 value; // This function multiplies 2 u64 values and produces a u128 value;
[[nodiscard]] static inline u128 Multiply64Into128(u64 a, u64 b) { [[nodiscard]] static inline u128 Multiply64Into128(u64 a, u64 b) {
u128 result; u128 result;
#ifdef _MSC_VER #ifdef MSV_BUT_NOT_CLANG
result[0] = _umul128(a, b, &result[1]); result[0] = _umul128(a, b, &result[1]);
#else #else
unsigned __int128 tmp = a; unsigned __int128 tmp = a;

View File

@ -24,7 +24,7 @@ constexpr auto PauseCycles = 100'000U;
} // Anonymous namespace } // Anonymous namespace
#ifdef _MSC_VER #if defined(_MSC_VER) && !defined(__clang__)
__forceinline static void TPAUSE() { __forceinline static void TPAUSE() {
static constexpr auto RequestC02State = 0U; static constexpr auto RequestC02State = 0U;
_tpause(RequestC02State, FencedRDTSC() + PauseCycles); _tpause(RequestC02State, FencedRDTSC() + PauseCycles);

View File

@ -1133,7 +1133,7 @@ add_library(core STATIC
memory/dmnt_cheat_vm.h memory/dmnt_cheat_vm.h
perf_stats.cpp perf_stats.cpp
perf_stats.h perf_stats.h
precompiled_headers.h precompiled_headers.hpp
reporter.cpp reporter.cpp
reporter.h reporter.h
tools/freezer.cpp tools/freezer.cpp
@ -1150,7 +1150,9 @@ if (MSVC)
) )
else() else()
target_compile_options(core PRIVATE target_compile_options(core PRIVATE
-Werror=conversion # Currently causes issues with Boost, degrading it to just a warning for now...
#-Werror=conversion
-Wconversion
-Wno-sign-conversion -Wno-sign-conversion
-Wno-cast-function-type -Wno-cast-function-type
@ -1161,6 +1163,9 @@ endif()
target_link_libraries(core PUBLIC common PRIVATE audio_core hid_core network video_core nx_tzdb tz) target_link_libraries(core PUBLIC common PRIVATE audio_core hid_core network video_core nx_tzdb tz)
target_link_libraries(core PUBLIC Boost::headers PRIVATE fmt::fmt nlohmann_json::nlohmann_json mbedtls RenderDoc::API) target_link_libraries(core PUBLIC Boost::headers PRIVATE fmt::fmt nlohmann_json::nlohmann_json mbedtls RenderDoc::API)
if (YUZU_USE_CPM)
target_link_libraries(core PUBLIC Boost::heap Boost::asio Boost::process Boost::crc)
endif()
if (MINGW) if (MINGW)
target_link_libraries(core PRIVATE ${MSWSOCK_LIBRARY}) target_link_libraries(core PRIVATE ${MSWSOCK_LIBRARY})
endif() endif()
@ -1230,7 +1235,7 @@ else()
endif() endif()
if (YUZU_USE_PRECOMPILED_HEADERS) if (YUZU_USE_PRECOMPILED_HEADERS)
target_precompile_headers(core PRIVATE precompiled_headers.h) target_precompile_headers(core PRIVATE precompiled_headers.hpp)
endif() endif()
if (YUZU_ENABLE_LTO) if (YUZU_ENABLE_LTO)

View File

@ -6,7 +6,7 @@
#include <thread> #include <thread>
#include <boost/asio.hpp> #include <boost/asio.hpp>
#include <boost/process/async_pipe.hpp> #include <boost/process/v1/async_pipe.hpp>
#include "common/logging/log.h" #include "common/logging/log.h"
#include "common/polyfill_thread.h" #include "common/polyfill_thread.h"
@ -326,7 +326,7 @@ private:
struct ConnectionState { struct ConnectionState {
boost::asio::ip::tcp::socket client_socket; boost::asio::ip::tcp::socket client_socket;
boost::process::async_pipe signal_pipe; boost::process::v1::async_pipe signal_pipe;
SignalInfo info; SignalInfo info;
Kernel::KScopedAutoObject<Kernel::KThread> active_thread; Kernel::KScopedAutoObject<Kernel::KThread> active_thread;

View File

@ -191,12 +191,12 @@ private:
struct VM { struct VM {
static constexpr u32 YUZU_PAGESIZE{0x1000}; static constexpr u32 YUZU_PAGESIZE{0x1000};
static constexpr u32 PAGE_SIZE_BITS{std::countr_zero(YUZU_PAGESIZE)}; static constexpr u32 PAGE_SIZE_BITS{static_cast<u32>(std::countr_zero(YUZU_PAGESIZE))};
static constexpr u32 SUPPORTED_BIG_PAGE_SIZES{0x30000}; static constexpr u32 SUPPORTED_BIG_PAGE_SIZES{0x30000};
static constexpr u32 DEFAULT_BIG_PAGE_SIZE{0x20000}; static constexpr u32 DEFAULT_BIG_PAGE_SIZE{0x20000};
u32 big_page_size{DEFAULT_BIG_PAGE_SIZE}; u32 big_page_size{DEFAULT_BIG_PAGE_SIZE};
u32 big_page_size_bits{std::countr_zero(DEFAULT_BIG_PAGE_SIZE)}; u32 big_page_size_bits{static_cast<u32>(std::countr_zero(DEFAULT_BIG_PAGE_SIZE))};
static constexpr u32 VA_START_SHIFT{10}; static constexpr u32 VA_START_SHIFT{10};
static constexpr u64 DEFAULT_VA_SPLIT{1ULL << 34}; static constexpr u64 DEFAULT_VA_SPLIT{1ULL << 34};

View File

@ -6,6 +6,6 @@
#include <boost/container/flat_map.hpp> // used by service.h which is heavily included #include <boost/container/flat_map.hpp> // used by service.h which is heavily included
#include <boost/intrusive/rbtree.hpp> // used by k_auto_object.h which is heavily included #include <boost/intrusive/rbtree.hpp> // used by k_auto_object.h which is heavily included
#include "common/common_precompiled_headers.h" #include "common/common_precompiled_headers.hpp"
#include "core/hle/kernel/k_process.h" #include "core/hle/kernel/k_process.h"

View File

@ -2,7 +2,7 @@
# SPDX-License-Identifier: GPL-2.0-or-later # SPDX-License-Identifier: GPL-2.0-or-later
add_executable(yuzu-room add_executable(yuzu-room
precompiled_headers.h precompiled_headers.hpp
yuzu_room.cpp yuzu_room.cpp
yuzu_room.rc yuzu_room.rc
) )
@ -24,7 +24,7 @@ if(UNIX AND NOT APPLE)
endif() endif()
if (YUZU_USE_PRECOMPILED_HEADERS) if (YUZU_USE_PRECOMPILED_HEADERS)
target_precompile_headers(yuzu-room PRIVATE precompiled_headers.h) target_precompile_headers(yuzu-room PRIVATE precompiled_headers.hpp)
endif() endif()
create_target_directory_groups(yuzu-room) create_target_directory_groups(yuzu-room)

View File

@ -3,4 +3,4 @@
#pragma once #pragma once
#include "common/common_precompiled_headers.h" #include "common/common_precompiled_headers.hpp"

View File

@ -134,7 +134,7 @@ add_library(hid_core STATIC
hid_result.h hid_result.h
hid_types.h hid_types.h
hid_util.h hid_util.h
precompiled_headers.h precompiled_headers.hpp
resource_manager.cpp resource_manager.cpp
resource_manager.h resource_manager.h
) )
@ -160,5 +160,5 @@ create_target_directory_groups(hid_core)
target_link_libraries(hid_core PUBLIC core) target_link_libraries(hid_core PUBLIC core)
if (YUZU_USE_PRECOMPILED_HEADERS) if (YUZU_USE_PRECOMPILED_HEADERS)
target_precompile_headers(hid_core PRIVATE precompiled_headers.h) target_precompile_headers(hid_core PRIVATE precompiled_headers.hpp)
endif() endif()

View File

@ -3,4 +3,4 @@
#pragma once #pragma once
#include "common/common_precompiled_headers.h" #include "common/common_precompiled_headers.hpp"

View File

@ -32,7 +32,7 @@ add_library(input_common STATIC
input_poller.h input_poller.h
main.cpp main.cpp
main.h main.h
precompiled_headers.h precompiled_headers.hpp
) )
if (MSVC) if (MSVC)
@ -42,7 +42,9 @@ if (MSVC)
) )
else() else()
target_compile_options(input_common PRIVATE target_compile_options(input_common PRIVATE
-Werror=conversion # Causes Boost to fail to compile, let's just let it be a warning for now.
#-Werror=conversion
-Wconversion
) )
endif() endif()
@ -89,7 +91,7 @@ create_target_directory_groups(input_common)
target_link_libraries(input_common PUBLIC hid_core PRIVATE common Boost::headers) target_link_libraries(input_common PUBLIC hid_core PRIVATE common Boost::headers)
if (YUZU_USE_PRECOMPILED_HEADERS) if (YUZU_USE_PRECOMPILED_HEADERS)
target_precompile_headers(input_common PRIVATE precompiled_headers.h) target_precompile_headers(input_common PRIVATE precompiled_headers.hpp)
endif() endif()
if (ANDROID) if (ANDROID)

View File

@ -26,8 +26,8 @@ public:
using clock = std::chrono::system_clock; using clock = std::chrono::system_clock;
explicit Socket(const std::string& host, u16 port, SocketCallback callback_) explicit Socket(const std::string& host, u16 port, SocketCallback callback_)
: callback(std::move(callback_)), timer(io_service), : callback(std::move(callback_)), timer(io_context),
socket(io_service, udp::endpoint(udp::v4(), 0)), client_id(GenerateRandomClientId()) { socket(io_context, udp::endpoint(udp::v4(), 0)), client_id(GenerateRandomClientId()) {
boost::system::error_code ec{}; boost::system::error_code ec{};
auto ipv4 = boost::asio::ip::make_address_v4(host, ec); auto ipv4 = boost::asio::ip::make_address_v4(host, ec);
if (ec.value() != boost::system::errc::success) { if (ec.value() != boost::system::errc::success) {
@ -39,11 +39,11 @@ public:
} }
void Stop() { void Stop() {
io_service.stop(); io_context.stop();
} }
void Loop() { void Loop() {
io_service.run(); io_context.run();
} }
void StartSend(const clock::time_point& from) { void StartSend(const clock::time_point& from) {
@ -113,7 +113,7 @@ private:
} }
SocketCallback callback; SocketCallback callback;
boost::asio::io_service io_service; boost::asio::io_context io_context;
boost::asio::basic_waitable_timer<clock> timer; boost::asio::basic_waitable_timer<clock> timer;
udp::socket socket; udp::socket socket;

View File

@ -1,6 +0,0 @@
// SPDX-FileCopyrightText: 2022 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include "common/common_precompiled_headers.h"

View File

@ -0,0 +1,6 @@
// SPDX-FileCopyrightText: 2022 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include "common/common_precompiled_headers.hpp"

View File

@ -8,7 +8,7 @@ add_library(network STATIC
network.h network.h
packet.cpp packet.cpp
packet.h packet.h
precompiled_headers.h precompiled_headers.hpp
room.cpp room.cpp
room.h room.h
room_member.cpp room_member.cpp
@ -26,5 +26,5 @@ if (ENABLE_WEB_SERVICE)
endif() endif()
if (YUZU_USE_PRECOMPILED_HEADERS) if (YUZU_USE_PRECOMPILED_HEADERS)
target_precompile_headers(network PRIVATE precompiled_headers.h) target_precompile_headers(network PRIVATE precompiled_headers.hpp)
endif() endif()

View File

@ -1,6 +0,0 @@
// SPDX-FileCopyrightText: 2022 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include "common/common_precompiled_headers.h"

View File

@ -0,0 +1,6 @@
// SPDX-FileCopyrightText: 2022 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include "common/common_precompiled_headers.hpp"

View File

@ -234,7 +234,7 @@ add_library(shader_recompiler STATIC
ir_opt/vendor_workaround_pass.cpp ir_opt/vendor_workaround_pass.cpp
ir_opt/verification_pass.cpp ir_opt/verification_pass.cpp
object_pool.h object_pool.h
precompiled_headers.h precompiled_headers.hpp
profile.h profile.h
program_header.h program_header.h
runtime_info.h runtime_info.h
@ -269,5 +269,5 @@ endif()
create_target_directory_groups(shader_recompiler) create_target_directory_groups(shader_recompiler)
if (YUZU_USE_PRECOMPILED_HEADERS) if (YUZU_USE_PRECOMPILED_HEADERS)
target_precompile_headers(shader_recompiler PRIVATE precompiled_headers.h) target_precompile_headers(shader_recompiler PRIVATE precompiled_headers.hpp)
endif() endif()

View File

@ -3,5 +3,5 @@
#pragma once #pragma once
#include "common/common_precompiled_headers.h" #include "common/common_precompiled_headers.hpp"
#include "frontend/maxwell/translate/impl/impl.h" #include "frontend/maxwell/translate/impl/impl.h"

View File

@ -14,7 +14,7 @@ add_executable(tests
common/unique_function.cpp common/unique_function.cpp
core/core_timing.cpp core/core_timing.cpp
core/internal_network/network.cpp core/internal_network/network.cpp
precompiled_headers.h precompiled_headers.hpp
video_core/memory_tracker.cpp video_core/memory_tracker.cpp
input_common/calibration_configuration_job.cpp input_common/calibration_configuration_job.cpp
) )
@ -27,5 +27,5 @@ target_link_libraries(tests PRIVATE ${PLATFORM_LIBRARIES} Catch2::Catch2WithMain
add_test(NAME tests COMMAND tests) add_test(NAME tests COMMAND tests)
if (YUZU_USE_PRECOMPILED_HEADERS) if (YUZU_USE_PRECOMPILED_HEADERS)
target_precompile_headers(tests PRIVATE precompiled_headers.h) target_precompile_headers(tests PRIVATE precompiled_headers.hpp)
endif() endif()

View File

@ -14,7 +14,7 @@
class FakeCemuhookServer { class FakeCemuhookServer {
public: public:
FakeCemuhookServer() FakeCemuhookServer()
: socket(io_service, boost::asio::ip::udp::endpoint(boost::asio::ip::udp::v4(), 0)) {} : socket(io_context, boost::asio::ip::udp::endpoint(boost::asio::ip::udp::v4(), 0)) {}
~FakeCemuhookServer() { ~FakeCemuhookServer() {
is_running = false; is_running = false;
@ -82,7 +82,7 @@ public:
} }
private: private:
boost::asio::io_service io_service; boost::asio::io_context io_context;
boost::asio::ip::udp::socket socket; boost::asio::ip::udp::socket socket;
std::array<u8, InputCommon::CemuhookUDP::MAX_PACKET_SIZE> send_buffer; std::array<u8, InputCommon::CemuhookUDP::MAX_PACKET_SIZE> send_buffer;
std::array<u8, InputCommon::CemuhookUDP::MAX_PACKET_SIZE> receive_buffer; std::array<u8, InputCommon::CemuhookUDP::MAX_PACKET_SIZE> receive_buffer;

View File

@ -1,6 +0,0 @@
// SPDX-FileCopyrightText: 2022 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include "common/common_precompiled_headers.h"

View File

@ -0,0 +1,6 @@
// SPDX-FileCopyrightText: 2022 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include "common/common_precompiled_headers.hpp"

View File

@ -99,7 +99,7 @@ add_library(video_core STATIC
invalidation_accumulator.h invalidation_accumulator.h
memory_manager.cpp memory_manager.cpp
memory_manager.h memory_manager.h
precompiled_headers.h precompiled_headers.hpp
present.h present.h
pte_kind.h pte_kind.h
query_cache/bank_base.h query_cache/bank_base.h
@ -372,10 +372,6 @@ if (ARCHITECTURE_x86_64)
macro/macro_jit_x64.h macro/macro_jit_x64.h
) )
target_link_libraries(video_core PUBLIC xbyak::xbyak) target_link_libraries(video_core PUBLIC xbyak::xbyak)
if (NOT MSVC)
target_compile_options(video_core PRIVATE -msse4.1)
endif()
endif() endif()
if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64) if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64)
@ -383,7 +379,7 @@ if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64)
endif() endif()
if (YUZU_USE_PRECOMPILED_HEADERS) if (YUZU_USE_PRECOMPILED_HEADERS)
target_precompile_headers(video_core PRIVATE precompiled_headers.h) target_precompile_headers(video_core PRIVATE precompiled_headers.hpp)
endif() endif()
if (YUZU_ENABLE_LTO) if (YUZU_ENABLE_LTO)

View File

@ -1,6 +0,0 @@
// SPDX-FileCopyrightText: 2022 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include "common/common_precompiled_headers.h"

View File

@ -0,0 +1,6 @@
// SPDX-FileCopyrightText: 2022 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include "common/common_precompiled_headers.hpp"

View File

@ -4,7 +4,7 @@
add_library(web_service STATIC add_library(web_service STATIC
announce_room_json.cpp announce_room_json.cpp
announce_room_json.h announce_room_json.h
precompiled_headers.h precompiled_headers.hpp
verify_login.cpp verify_login.cpp
verify_login.h verify_login.h
verify_user_jwt.cpp verify_user_jwt.cpp
@ -18,5 +18,5 @@ create_target_directory_groups(web_service)
target_link_libraries(web_service PRIVATE common network nlohmann_json::nlohmann_json httplib::httplib cpp-jwt::cpp-jwt) target_link_libraries(web_service PRIVATE common network nlohmann_json::nlohmann_json httplib::httplib cpp-jwt::cpp-jwt)
if (YUZU_USE_PRECOMPILED_HEADERS) if (YUZU_USE_PRECOMPILED_HEADERS)
target_precompile_headers(web_service PRIVATE precompiled_headers.h) target_precompile_headers(web_service PRIVATE precompiled_headers.hpp)
endif() endif()

View File

@ -1,6 +0,0 @@
// SPDX-FileCopyrightText: 2022 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include "common/common_precompiled_headers.h"

View File

@ -0,0 +1,6 @@
// SPDX-FileCopyrightText: 2022 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include "common/common_precompiled_headers.hpp"

View File

@ -203,7 +203,7 @@ add_executable(yuzu
multiplayer/validation.h multiplayer/validation.h
play_time_manager.cpp play_time_manager.cpp
play_time_manager.h play_time_manager.h
precompiled_headers.h precompiled_headers.hpp
qt_common.cpp qt_common.cpp
qt_common.h qt_common.h
startup_checks.cpp startup_checks.cpp
@ -382,8 +382,11 @@ elseif(WIN32)
endif() endif()
target_link_libraries(yuzu PRIVATE common core input_common frontend_common network video_core) target_link_libraries(yuzu PRIVATE common core input_common frontend_common network video_core)
target_link_libraries(yuzu PRIVATE Boost::headers glad Qt${QT_MAJOR_VERSION}::Widgets) target_link_libraries(yuzu PRIVATE Boost::headers httplib::httplib glad Qt${QT_MAJOR_VERSION}::Widgets)
target_link_libraries(yuzu PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads) target_link_libraries(yuzu PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads)
if (TARGET nlohmann::json)
target_link_libraries(yuzu PRIVATE nlohmann::json)
endif()
if (ENABLE_WEB_SERVICE) if (ENABLE_WEB_SERVICE)
target_link_libraries(yuzu PRIVATE httplib::httplib) target_link_libraries(yuzu PRIVATE httplib::httplib)
endif() endif()
@ -477,7 +480,7 @@ if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64)
endif() endif()
if (YUZU_USE_PRECOMPILED_HEADERS) if (YUZU_USE_PRECOMPILED_HEADERS)
target_precompile_headers(yuzu PRIVATE precompiled_headers.h) target_precompile_headers(yuzu PRIVATE precompiled_headers.hpp)
endif() endif()
create_target_directory_groups(yuzu) create_target_directory_groups(yuzu)

View File

@ -1,6 +0,0 @@
// SPDX-FileCopyrightText: 2022 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include "common/common_precompiled_headers.h"

View File

@ -0,0 +1,6 @@
// SPDX-FileCopyrightText: 2022 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include "common/common_precompiled_headers.hpp"

View File

@ -22,7 +22,7 @@ if (YUZU_CMD)
emu_window/emu_window_sdl2_null.h emu_window/emu_window_sdl2_null.h
emu_window/emu_window_sdl2_vk.cpp emu_window/emu_window_sdl2_vk.cpp
emu_window/emu_window_sdl2_vk.h emu_window/emu_window_sdl2_vk.h
precompiled_headers.h precompiled_headers.hpp
sdl_config.cpp sdl_config.cpp
sdl_config.h sdl_config.h
yuzu.cpp yuzu.cpp
@ -60,7 +60,7 @@ if (YUZU_CMD)
endif() endif()
if (YUZU_USE_PRECOMPILED_HEADERS) if (YUZU_USE_PRECOMPILED_HEADERS)
target_precompile_headers(yuzu-cmd PRIVATE precompiled_headers.h) target_precompile_headers(yuzu-cmd PRIVATE precompiled_headers.hpp)
endif() endif()
create_target_directory_groups(yuzu-cmd) create_target_directory_groups(yuzu-cmd)

View File

@ -1,6 +0,0 @@
// SPDX-FileCopyrightText: 2022 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include "common/common_precompiled_headers.h"

View File

@ -0,0 +1,6 @@
// SPDX-FileCopyrightText: 2022 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include "common/common_precompiled_headers.hpp"