diff --git a/.gitmodules b/.gitmodules index 2a72dbf6ba..9c16165d28 100644 --- a/.gitmodules +++ b/.gitmodules @@ -72,10 +72,6 @@ path = ui/thirdparty/implot url = https://github.com/epezent/implot.git ignore = untracked -[submodule "hw/xbox/nv2a/xxHash"] - path = util/xxHash - url = https://github.com/Cyan4973/xxHash.git - ignore = untracked [submodule "genconfig"] path = genconfig url = https://github.com/mborgerson/genconfig.git diff --git a/configure b/configure index c1084673fa..e4b5993b6f 100755 --- a/configure +++ b/configure @@ -237,7 +237,7 @@ else git_submodules_action="ignore" 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" # Don't accept a target_list environment variable. diff --git a/meson.build b/meson.build index b17a2e3264..53923ee72a 100644 --- a/meson.build +++ b/meson.build @@ -2898,6 +2898,9 @@ config_host_data.set('CONFIG_SLIRP', slirp.found()) tomlplusplus_proj = subproject('tomlplusplus', default_options: ['default_library=static']) 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 # ##################### @@ -3198,8 +3201,7 @@ util_ss.add_all(trace_ss) util_ss = util_ss.apply(config_all, strict: false) libqemuutil = static_library('qemuutil', sources: util_ss.sources() + stub_ss.sources() + genh, - include_directories: 'util/xxHash', - dependencies: [util_ss.dependencies(), libm, threads, glib, socket, malloc, pixman]) + dependencies: [util_ss.dependencies(), libm, threads, glib, socket, malloc, pixman, xxhash]) qemuutil = declare_dependency(link_with: libqemuutil, sources: genh + version_res, dependencies: [event_loop_base]) diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh index bff2f5d2f5..b319d5bf61 100755 --- a/scripts/archive-source.sh +++ b/scripts/archive-source.sh @@ -30,9 +30,9 @@ submodules="dtc meson ui/keycodemapdb" submodules="$submodules tests/fp/berkeley-softfloat-3 tests/fp/berkeley-testfloat-3" # 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="" diff --git a/scripts/gen-license.py b/scripts/gen-license.py index dd69073172..015342630b 100755 --- a/scripts/gen-license.py +++ b/scripts/gen-license.py @@ -224,7 +224,7 @@ Lib('tomlplusplus', 'https://github.com/marzer/tomlplusplus', Lib('xxHash', 'https://github.com/Cyan4973/xxHash.git', bsd, 'https://raw.githubusercontent.com/Cyan4973/xxHash/dev/LICENSE', license_lines=(1,26), ships_static=all_platforms, - submodule=Submodule('util/xxHash') + submodule=Submodule('subprojects/xxhash.wrap') ), Lib('fpng', 'https://github.com/richgel999/fpng', diff --git a/subprojects/.gitignore b/subprojects/.gitignore index 4be0564261..103b99de1a 100644 --- a/subprojects/.gitignore +++ b/subprojects/.gitignore @@ -5,3 +5,4 @@ VulkanMemoryAllocator nv2a_vsh_cpu tomlplusplus cpp-httplib +xxHash-* diff --git a/subprojects/xxhash.wrap b/subprojects/xxhash.wrap new file mode 100644 index 0000000000..e4d612565f --- /dev/null +++ b/subprojects/xxhash.wrap @@ -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 diff --git a/util/fast-hash.c b/util/fast-hash.c index 8b3095e9dc..84e9c3c593 100644 --- a/util/fast-hash.c +++ b/util/fast-hash.c @@ -1,5 +1,5 @@ #include "qemu/fast-hash.h" -#include +#include uint64_t fast_hash(const uint8_t *data, size_t len) { diff --git a/util/xxHash b/util/xxHash deleted file mode 160000 index 72e69d33c7..0000000000 --- a/util/xxHash +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 72e69d33c7521b122cfa3262ae4d0dc60a514439