Browse Source
[chore] unordered_dense: fix cmake inclusion and bundle-it
Signed-off-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
pull/3442/head
lizzie
1 month ago
committed by
Caio Oliveira
No known key found for this signature in database
GPG Key ID: AAAE6C7FD4186B0C
7 changed files with
41 additions and
23 deletions
-
.patch/unordered-dense/0001-avoid-memset-when-clearing-an-empty-table.patch
-
CMakeLists.txt
-
externals/CMakeLists.txt
-
externals/cpmfile.json
-
src/common/CMakeLists.txt
-
src/dynarmic/CMakeLists.txt
-
src/dynarmic/src/dynarmic/CMakeLists.txt
|
|
|
@ -0,0 +1,26 @@ |
|
|
|
From b3622608433c183ba868a1dc8dd9cf285eb3b916 Mon Sep 17 00:00:00 2001 |
|
|
|
From: Dario Petrillo <dario.pk1@gmail.com> |
|
|
|
Date: Thu, 27 Nov 2025 23:12:38 +0100 |
|
|
|
Subject: [PATCH] avoid extra memset when clearing an empty table |
|
|
|
|
|
|
|
---
|
|
|
|
include/ankerl/unordered_dense.h | 6 ++++-- |
|
|
|
1 file changed, 4 insertions(+), 2 deletions(-) |
|
|
|
|
|
|
|
diff --git a/include/ankerl/unordered_dense.h b/include/ankerl/unordered_dense.h
|
|
|
|
index 0835342..4938212 100644
|
|
|
|
--- a/include/ankerl/unordered_dense.h
|
|
|
|
+++ b/include/ankerl/unordered_dense.h
|
|
|
|
@@ -1490,8 +1490,10 @@ class table : public std::conditional_t<is_map_v<T>, base_table_type_map<T>, bas
|
|
|
|
// modifiers ////////////////////////////////////////////////////////////// |
|
|
|
|
|
|
|
void clear() { |
|
|
|
- m_values.clear();
|
|
|
|
- clear_buckets();
|
|
|
|
+ if (!empty()) {
|
|
|
|
+ m_values.clear();
|
|
|
|
+ clear_buckets();
|
|
|
|
+ }
|
|
|
|
} |
|
|
|
|
|
|
|
auto insert(value_type const& value) -> std::pair<iterator, bool> { |
|
|
|
@ -576,6 +576,7 @@ add_subdirectory(externals) |
|
|
|
# pass targets from externals |
|
|
|
find_package(enet) |
|
|
|
find_package(MbedTLS) |
|
|
|
find_package(unordered_dense REQUIRED) |
|
|
|
|
|
|
|
if (ARCHITECTURE_x86 OR ARCHITECTURE_x86_64) |
|
|
|
find_package(xbyak) |
|
|
|
|
|
|
|
@ -66,6 +66,9 @@ if (NOT TARGET LLVM::Demangle) |
|
|
|
add_library(LLVM::Demangle ALIAS demangle) |
|
|
|
endif() |
|
|
|
|
|
|
|
# unordered_dense |
|
|
|
AddJsonPackage(unordered-dense) |
|
|
|
|
|
|
|
if (YUZU_STATIC_ROOM) |
|
|
|
return() |
|
|
|
endif() |
|
|
|
@ -244,9 +247,6 @@ if (ENABLE_WEB_SERVICE OR ENABLE_UPDATE_CHECKER) |
|
|
|
AddJsonPackage(cpp-jwt) |
|
|
|
endif() |
|
|
|
|
|
|
|
# unordered_dense |
|
|
|
AddJsonPackage(unordered-dense) |
|
|
|
|
|
|
|
# FFMpeg |
|
|
|
if (YUZU_USE_EXTERNAL_FFMPEG OR YUZU_USE_BUNDLED_FFMPEG) |
|
|
|
add_subdirectory(ffmpeg) |
|
|
|
|
|
|
|
@ -94,7 +94,11 @@ |
|
|
|
"tag": "v%VERSION%", |
|
|
|
"hash": "b98b5d4d96f8e0081b184d6c4c1181fae4e41723b54bed4296717d7f417348b48fad0bbcc664cac142b8c8a47e95aa57c1eb1cf6caa855fd782fad3e3ab99e5e", |
|
|
|
"find_args": "CONFIG", |
|
|
|
"git_version": "4.8.1" |
|
|
|
"git_version": "4.8.1", |
|
|
|
"bundled": true, |
|
|
|
"patches": [ |
|
|
|
"0001-avoid-memset-when-clearing-an-empty-table.patch" |
|
|
|
] |
|
|
|
}, |
|
|
|
"mbedtls": { |
|
|
|
"package": "MbedTLS", |
|
|
|
|
|
|
|
@ -253,11 +253,7 @@ if (lz4_ADDED) |
|
|
|
target_include_directories(common PRIVATE ${lz4_SOURCE_DIR}/lib) |
|
|
|
endif() |
|
|
|
|
|
|
|
if (TARGET unordered_dense::unordered_dense) |
|
|
|
# weird quirk of system installs |
|
|
|
target_link_libraries(common PUBLIC unordered_dense::unordered_dense) |
|
|
|
endif() |
|
|
|
target_link_libraries(common PUBLIC fmt::fmt stb::headers Threads::Threads) |
|
|
|
target_link_libraries(common PUBLIC fmt::fmt stb::headers Threads::Threads unordered_dense::unordered_dense) |
|
|
|
target_link_libraries(common PRIVATE lz4::lz4 LLVM::Demangle zstd::zstd) |
|
|
|
|
|
|
|
if(ANDROID) |
|
|
|
|
|
|
|
@ -118,6 +118,7 @@ endif() |
|
|
|
|
|
|
|
find_package(fmt 8 CONFIG) |
|
|
|
find_package(mcl 0.1.12 REQUIRED) |
|
|
|
find_package(unordered_dense REQUIRED) |
|
|
|
|
|
|
|
if ("arm64" IN_LIST ARCHITECTURE OR DYNARMIC_TESTS) |
|
|
|
find_package(oaknut 2.0.1 CONFIG) |
|
|
|
|
|
|
|
@ -1,4 +1,4 @@ |
|
|
|
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project |
|
|
|
# SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project |
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later |
|
|
|
include(TargetArchitectureSpecificSources) |
|
|
|
|
|
|
|
@ -356,20 +356,10 @@ set_target_properties(dynarmic PROPERTIES |
|
|
|
SOVERSION ${dynarmic_VERSION_MAJOR}.${dynarmic_VERSION_MINOR} |
|
|
|
) |
|
|
|
|
|
|
|
if (TARGET unordered_dense::unordered_dense) |
|
|
|
# weird quirk of system installs |
|
|
|
target_link_libraries(dynarmic |
|
|
|
PRIVATE |
|
|
|
unordered_dense::unordered_dense |
|
|
|
) |
|
|
|
endif() |
|
|
|
|
|
|
|
target_compile_options(dynarmic PRIVATE ${DYNARMIC_CXX_FLAGS}) |
|
|
|
target_link_libraries(dynarmic |
|
|
|
PUBLIC |
|
|
|
fmt::fmt |
|
|
|
merry::mcl |
|
|
|
) |
|
|
|
|
|
|
|
target_link_libraries(dynarmic PRIVATE unordered_dense::unordered_dense) |
|
|
|
target_link_libraries(dynarmic PUBLIC fmt::fmt merry::mcl) |
|
|
|
|
|
|
|
if (BOOST_NO_HEADERS) |
|
|
|
target_link_libraries(dynarmic PRIVATE Boost::variant Boost::icl Boost::pool) |
|
|
|
|