meson: Migrate xxhash submodule to a subproject

This commit is contained in:
Matt Borgerson 2025-01-02 15:48:21 -07:00 committed by mborgerson
parent 616a5e5d0b
commit f96f2754cc
9 changed files with 23 additions and 12 deletions

4
.gitmodules vendored
View File

@ -72,10 +72,6 @@
path = ui/thirdparty/implot path = ui/thirdparty/implot
url = https://github.com/epezent/implot.git url = https://github.com/epezent/implot.git
ignore = untracked ignore = untracked
[submodule "hw/xbox/nv2a/xxHash"]
path = util/xxHash
url = https://github.com/Cyan4973/xxHash.git
ignore = untracked
[submodule "genconfig"] [submodule "genconfig"]
path = genconfig path = genconfig
url = https://github.com/mborgerson/genconfig.git url = https://github.com/mborgerson/genconfig.git

2
configure vendored
View File

@ -237,7 +237,7 @@ else
git_submodules_action="ignore" git_submodules_action="ignore"
fi fi
git_submodules="ui/keycodemapdb ui/thirdparty/imgui ui/thirdparty/implot util/xxHash genconfig" git_submodules="ui/keycodemapdb ui/thirdparty/imgui ui/thirdparty/implot genconfig"
git="git" git="git"
# Don't accept a target_list environment variable. # Don't accept a target_list environment variable.

View File

@ -2898,6 +2898,9 @@ config_host_data.set('CONFIG_SLIRP', slirp.found())
tomlplusplus_proj = subproject('tomlplusplus', default_options: ['default_library=static']) tomlplusplus_proj = subproject('tomlplusplus', default_options: ['default_library=static'])
tomlplusplus = tomlplusplus_proj.get_variable('tomlplusplus_dep') tomlplusplus = tomlplusplus_proj.get_variable('tomlplusplus_dep')
xxhash_proj = subproject('xxhash', default_options: ['default_library=static'])
xxhash = xxhash_proj.get_variable('xxhash_dep')
##################### #####################
# Generated sources # # Generated sources #
##################### #####################
@ -3198,8 +3201,7 @@ util_ss.add_all(trace_ss)
util_ss = util_ss.apply(config_all, strict: false) util_ss = util_ss.apply(config_all, strict: false)
libqemuutil = static_library('qemuutil', libqemuutil = static_library('qemuutil',
sources: util_ss.sources() + stub_ss.sources() + genh, sources: util_ss.sources() + stub_ss.sources() + genh,
include_directories: 'util/xxHash', dependencies: [util_ss.dependencies(), libm, threads, glib, socket, malloc, pixman, xxhash])
dependencies: [util_ss.dependencies(), libm, threads, glib, socket, malloc, pixman])
qemuutil = declare_dependency(link_with: libqemuutil, qemuutil = declare_dependency(link_with: libqemuutil,
sources: genh + version_res, sources: genh + version_res,
dependencies: [event_loop_base]) dependencies: [event_loop_base])

View File

@ -30,9 +30,9 @@ submodules="dtc meson ui/keycodemapdb"
submodules="$submodules tests/fp/berkeley-softfloat-3 tests/fp/berkeley-testfloat-3" submodules="$submodules tests/fp/berkeley-softfloat-3 tests/fp/berkeley-testfloat-3"
# xemu extras # xemu extras
submodules="$submodules ui/thirdparty/imgui ui/thirdparty/implot util/xxHash genconfig" submodules="$submodules ui/thirdparty/imgui ui/thirdparty/implot genconfig"
subprojects="glslang SPIRV-Reflect volk VulkanMemoryAllocator nv2a_vsh_cpu tomlplusplus cpp-httplib" subprojects="glslang SPIRV-Reflect volk VulkanMemoryAllocator nv2a_vsh_cpu tomlplusplus cpp-httplib xxhash"
sub_deinit="" sub_deinit=""

View File

@ -224,7 +224,7 @@ Lib('tomlplusplus', 'https://github.com/marzer/tomlplusplus',
Lib('xxHash', 'https://github.com/Cyan4973/xxHash.git', Lib('xxHash', 'https://github.com/Cyan4973/xxHash.git',
bsd, 'https://raw.githubusercontent.com/Cyan4973/xxHash/dev/LICENSE', license_lines=(1,26), bsd, 'https://raw.githubusercontent.com/Cyan4973/xxHash/dev/LICENSE', license_lines=(1,26),
ships_static=all_platforms, ships_static=all_platforms,
submodule=Submodule('util/xxHash') submodule=Submodule('subprojects/xxhash.wrap')
), ),
Lib('fpng', 'https://github.com/richgel999/fpng', Lib('fpng', 'https://github.com/richgel999/fpng',

View File

@ -5,3 +5,4 @@ VulkanMemoryAllocator
nv2a_vsh_cpu nv2a_vsh_cpu
tomlplusplus tomlplusplus
cpp-httplib cpp-httplib
xxHash-*

13
subprojects/xxhash.wrap Normal file
View File

@ -0,0 +1,13 @@
[wrap-file]
directory = xxHash-0.8.2
source_url = https://github.com/Cyan4973/xxHash/archive/v0.8.2.tar.gz
source_filename = xxHash-0.8.2.tar.gz
source_hash = baee0c6afd4f03165de7a4e67988d16f0f2b257b51d0e3cb91909302a26a79c4
patch_filename = xxhash_0.8.2-1_patch.zip
patch_url = https://wrapdb.mesonbuild.com/v2/xxhash_0.8.2-1/get_patch
patch_hash = e721ef7a4c4ee0ade8b8440f6f7cb9f935b68e825249d74cb1c2503c53e68d25
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/xxhash_0.8.2-1/xxHash-0.8.2.tar.gz
wrapdb_version = 0.8.2-1
[provide]
libxxhash = xxhash_dep

View File

@ -1,5 +1,5 @@
#include "qemu/fast-hash.h" #include "qemu/fast-hash.h"
#include <xxh3.h> #include <xxhash.h>
uint64_t fast_hash(const uint8_t *data, size_t len) uint64_t fast_hash(const uint8_t *data, size_t len)
{ {

@ -1 +0,0 @@
Subproject commit 72e69d33c7521b122cfa3262ae4d0dc60a514439