aboutsummaryrefslogtreecommitdiff
path: root/.patch
diff options
context:
space:
mode:
authorlizzie <lizzie@eden-emu.dev>2025-09-09 20:47:49 +0200
committercrueter <crueter@eden-emu.dev>2025-09-09 20:47:49 +0200
commit9d2681ecc9565681db623fb71799e76381998512 (patch)
tree3133129860a1569a8be8e7e0c9c5985adbd992ca /.patch
parent428f136a754096e34c7bfec902684e2546a43ca4 (diff)
[cmake] enable clang-cl and WoA builds (#348)
Compilation and CMake fixes for both Windows on ARM and clang-cl, meaning Windows can now be built on both MSVC and clang on both amd64 and aarch64. Compiling on clang is *dramatically* faster so this should be useful for CI. Co-authored-by: crueter <crueter@eden-emu.dev> Co-authored-by: crueter <crueter@crueter.xyz> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/348 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: crueter <crueter@eden-emu.dev> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
Diffstat (limited to '.patch')
-rw-r--r--.patch/boost/0001-clang-cl.patch13
-rw-r--r--.patch/boost/0002-use-marmasm.patch11
-rw-r--r--.patch/boost/0003-armasm-options.patch14
-rw-r--r--.patch/cpp-jwt/0001-no-install.patch47
-rw-r--r--.patch/cpp-jwt/0002-missing-decl.patch13
-rw-r--r--.patch/discord-rpc/0001-cmake-version.patch10
-rw-r--r--.patch/discord-rpc/0002-no-clang-format.patch40
-rw-r--r--.patch/discord-rpc/0003-fix-cpp17.patch31
-rw-r--r--.patch/unordered-dense/0001-cmake.patch22
9 files changed, 38 insertions, 163 deletions
diff --git a/.patch/boost/0001-clang-cl.patch b/.patch/boost/0001-clang-cl.patch
new file mode 100644
index 0000000000..cdabc712cb
--- /dev/null
+++ b/.patch/boost/0001-clang-cl.patch
@@ -0,0 +1,13 @@
+diff --git a/libs/cobalt/include/boost/cobalt/concepts.hpp b/libs/cobalt/include/boost/cobalt/concepts.hpp
+index d49f2ec..a9bdb80 100644
+--- a/libs/cobalt/include/boost/cobalt/concepts.hpp
++++ b/libs/cobalt/include/boost/cobalt/concepts.hpp
+@@ -62,7 +62,7 @@ struct enable_awaitables
+ template <typename T>
+ concept with_get_executor = requires (T& t)
+ {
+- {t.get_executor()} -> asio::execution::executor;
++ t.get_executor();
+ };
+
+
diff --git a/.patch/boost/0002-use-marmasm.patch b/.patch/boost/0002-use-marmasm.patch
new file mode 100644
index 0000000000..10f490b878
--- /dev/null
+++ b/.patch/boost/0002-use-marmasm.patch
@@ -0,0 +1,11 @@
+--- a/libs/context/CMakeLists.txt 2025-09-08 00:42:31.303651800 -0400
++++ b/libs/context/CMakeLists.txt 2025-09-08 00:42:40.592184300 -0400
+@@ -146,7 +146,7 @@
+ set(ASM_LANGUAGE ASM)
+ endif()
+ elseif(BOOST_CONTEXT_ASSEMBLER STREQUAL armasm)
+- set(ASM_LANGUAGE ASM_ARMASM)
++ set(ASM_LANGUAGE ASM_MARMASM)
+ else()
+ set(ASM_LANGUAGE ASM_MASM)
+ endif()
diff --git a/.patch/boost/0003-armasm-options.patch b/.patch/boost/0003-armasm-options.patch
new file mode 100644
index 0000000000..3869f95f6f
--- /dev/null
+++ b/.patch/boost/0003-armasm-options.patch
@@ -0,0 +1,14 @@
+diff --git a/libs/context/CMakeLists.txt b/libs/context/CMakeLists.txt
+index 8210f65..0e59dd7 100644
+--- a/libs/context/CMakeLists.txt
++++ b/libs/context/CMakeLists.txt
+@@ -186,7 +186,8 @@ if(BOOST_CONTEXT_IMPLEMENTATION STREQUAL "fcontext")
+ set_property(SOURCE ${ASM_SOURCES} APPEND PROPERTY COMPILE_OPTIONS "/safeseh")
+ endif()
+
+- else() # masm
++ # armasm doesn't support most of these options
++ elseif(NOT BOOST_CONTEXT_ASSEMBLER STREQUAL armasm) # masm
+ 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")
diff --git a/.patch/cpp-jwt/0001-no-install.patch b/.patch/cpp-jwt/0001-no-install.patch
deleted file mode 100644
index b5be557a53..0000000000
--- a/.patch/cpp-jwt/0001-no-install.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 8c1761f..52c4ca4 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -69,42 +69,3 @@ endif()
- if(CPP_JWT_BUILD_EXAMPLES)
- add_subdirectory(examples)
- endif()
--
--# ##############################################################################
--# INSTALL
--# ##############################################################################
--
--include(GNUInstallDirs)
--include(CMakePackageConfigHelpers)
--set(CPP_JWT_CONFIG_INSTALL_DIR ${CMAKE_INSTALL_DATADIR}/cmake/${PROJECT_NAME})
--
--install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}Targets)
--install(
-- EXPORT ${PROJECT_NAME}Targets
-- DESTINATION ${CPP_JWT_CONFIG_INSTALL_DIR}
-- NAMESPACE ${PROJECT_NAME}::
-- COMPONENT dev)
--configure_package_config_file(cmake/Config.cmake.in ${PROJECT_NAME}Config.cmake
-- INSTALL_DESTINATION ${CPP_JWT_CONFIG_INSTALL_DIR}
-- NO_SET_AND_CHECK_MACRO)
--write_basic_package_version_file(${PROJECT_NAME}ConfigVersion.cmake
-- COMPATIBILITY SameMajorVersion
-- ARCH_INDEPENDENT)
--install(
-- FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
-- ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
-- DESTINATION ${CPP_JWT_CONFIG_INSTALL_DIR}
-- COMPONENT dev)
--
--if(NOT CPP_JWT_USE_VENDORED_NLOHMANN_JSON)
-- set(CPP_JWT_VENDORED_NLOHMANN_JSON_INSTALL_PATTERN PATTERN "json" EXCLUDE)
--endif()
--install(
-- DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/jwt/
-- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/jwt
-- COMPONENT dev
-- FILES_MATCHING
-- PATTERN "*.hpp"
-- PATTERN "*.ipp"
-- PATTERN "test" EXCLUDE
-- ${CPP_JWT_VENDORED_NLOHMANN_JSON_INSTALL_PATTERN})
diff --git a/.patch/cpp-jwt/0002-missing-decl.patch b/.patch/cpp-jwt/0002-missing-decl.patch
deleted file mode 100644
index cd5175dbe0..0000000000
--- a/.patch/cpp-jwt/0002-missing-decl.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/include/jwt/algorithm.hpp b/include/jwt/algorithm.hpp
-index 0e3b843..1156e6a 100644
---- a/include/jwt/algorithm.hpp
-+++ b/include/jwt/algorithm.hpp
-@@ -64,6 +64,8 @@ using verify_func_t = verify_result_t (*) (const jwt::string_view key,
- const jwt::string_view head,
- const jwt::string_view jwt_sign);
-
-+verify_result_t is_secret_a_public_key(const jwt::string_view secret);
-+
- namespace algo {
-
- //Me: TODO: All these can be done using code generaion.
diff --git a/.patch/discord-rpc/0001-cmake-version.patch b/.patch/discord-rpc/0001-cmake-version.patch
deleted file mode 100644
index 6a1609fadf..0000000000
--- a/.patch/discord-rpc/0001-cmake-version.patch
+++ /dev/null
@@ -1,10 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 5dad9e9..760a1b2 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -1,4 +1,4 @@
--cmake_minimum_required (VERSION 3.2.0)
-+cmake_minimum_required (VERSION 3.10)
- project (DiscordRPC)
-
- include(GNUInstallDirs)
diff --git a/.patch/discord-rpc/0002-no-clang-format.patch b/.patch/discord-rpc/0002-no-clang-format.patch
deleted file mode 100644
index 4b1e37c29f..0000000000
--- a/.patch/discord-rpc/0002-no-clang-format.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 760a1b2..540d643 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -12,20 +12,6 @@ file(GLOB_RECURSE ALL_SOURCE_FILES
- src/*.cpp src/*.h src/*.c
- )
-
--# Set CLANG_FORMAT_SUFFIX if you are using custom clang-format, e.g. clang-format-5.0
--find_program(CLANG_FORMAT_CMD clang-format${CLANG_FORMAT_SUFFIX})
--
--if (CLANG_FORMAT_CMD)
-- add_custom_target(
-- clangformat
-- COMMAND ${CLANG_FORMAT_CMD}
-- -i -style=file -fallback-style=none
-- ${ALL_SOURCE_FILES}
-- DEPENDS
-- ${ALL_SOURCE_FILES}
-- )
--endif(CLANG_FORMAT_CMD)
--
- # thirdparty stuff
- execute_process(
- COMMAND mkdir ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty
-diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index 290d761..cd2cc92 100644
---- a/src/CMakeLists.txt
-+++ b/src/CMakeLists.txt
-@@ -120,10 +120,6 @@ if (${BUILD_SHARED_LIBS})
- target_compile_definitions(discord-rpc PRIVATE -DDISCORD_BUILDING_SDK)
- endif(${BUILD_SHARED_LIBS})
-
--if (CLANG_FORMAT_CMD)
-- add_dependencies(discord-rpc clangformat)
--endif(CLANG_FORMAT_CMD)
--
- # install
-
- install(
diff --git a/.patch/discord-rpc/0003-fix-cpp17.patch b/.patch/discord-rpc/0003-fix-cpp17.patch
deleted file mode 100644
index 35b725d307..0000000000
--- a/.patch/discord-rpc/0003-fix-cpp17.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 540d643..5d12f3d 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -17,12 +17,14 @@ execute_process(
- COMMAND mkdir ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty
- ERROR_QUIET
- )
-+# new commit that fixes c++17
-+set(RAPIDJSON_SHA 3b2441b87f99ab65f37b141a7b548ebadb607b96)
-
--find_file(RAPIDJSONTEST NAMES rapidjson rapidjson-1.1.0 PATHS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty CMAKE_FIND_ROOT_PATH_BOTH)
-+find_file(RAPIDJSONTEST NAMES rapidjson rapidjson-${RAPIDJSON_SHA} PATHS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty CMAKE_FIND_ROOT_PATH_BOTH)
- if (NOT RAPIDJSONTEST)
- message("no rapidjson, download")
-- set(RJ_TAR_FILE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/v1.1.0.tar.gz)
-- file(DOWNLOAD https://github.com/miloyip/rapidjson/archive/v1.1.0.tar.gz ${RJ_TAR_FILE})
-+ set(RJ_TAR_FILE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/${RAPIDJSON_SHA}.tar.gz)
-+ file(DOWNLOAD https://github.com/miloyip/rapidjson/archive/${RAPIDJSON_SHA}.tar.gz ${RJ_TAR_FILE})
- execute_process(
- COMMAND ${CMAKE_COMMAND} -E tar xzf ${RJ_TAR_FILE}
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty
-@@ -30,7 +32,7 @@ if (NOT RAPIDJSONTEST)
- file(REMOVE ${RJ_TAR_FILE})
- endif(NOT RAPIDJSONTEST)
-
--find_file(RAPIDJSON NAMES rapidjson rapidjson-1.1.0 PATHS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty CMAKE_FIND_ROOT_PATH_BOTH)
-+find_file(RAPIDJSON NAMES rapidjson rapidjson-${RAPIDJSON_SHA} PATHS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty CMAKE_FIND_ROOT_PATH_BOTH)
-
- add_library(rapidjson STATIC IMPORTED ${RAPIDJSON})
-
diff --git a/.patch/unordered-dense/0001-cmake.patch b/.patch/unordered-dense/0001-cmake.patch
deleted file mode 100644
index 39e7794b1f..0000000000
--- a/.patch/unordered-dense/0001-cmake.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From e59d30b7b12e1d04cc2fc9c6219e35bda447c17e Mon Sep 17 00:00:00 2001
-From: Lizzie <159065448+Lizzie841@users.noreply.github.com>
-Date: Fri, 16 May 2025 04:12:13 +0100
-Subject: [PATCH] Update CMakeLists.txt
-
----
- CMakeLists.txt | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index b5f4c4f..c5c6f31 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -24,7 +24,7 @@ target_include_directories(
-
- target_compile_features(unordered_dense INTERFACE cxx_std_17)
-
--if(_unordered_dense_is_toplevel_project)
-+if(_unordered_dense_is_toplevel_project OR UNORDERED_DENSE_INSTALL)
- # locations are provided by GNUInstallDirs
- install(
- TARGETS unordered_dense