summaryrefslogtreecommitdiff
path: root/src/third_party/zstandard/zstd/build/meson/lib/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'src/third_party/zstandard/zstd/build/meson/lib/meson.build')
-rw-r--r--src/third_party/zstandard/zstd/build/meson/lib/meson.build10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/third_party/zstandard/zstd/build/meson/lib/meson.build b/src/third_party/zstandard/zstd/build/meson/lib/meson.build
index 1f4f8c25db3..6b093378101 100644
--- a/src/third_party/zstandard/zstd/build/meson/lib/meson.build
+++ b/src/third_party/zstandard/zstd/build/meson/lib/meson.build
@@ -37,7 +37,6 @@ libzstd_sources = [join_paths(zstd_rootdir, 'lib/common/entropy_common.c'),
join_paths(zstd_rootdir, 'lib/compress/zstd_opt.c'),
join_paths(zstd_rootdir, 'lib/compress/zstd_ldm.c'),
join_paths(zstd_rootdir, 'lib/decompress/huf_decompress.c'),
- join_paths(zstd_rootdir, 'lib/decompress/huf_decompress_amd64.S'),
join_paths(zstd_rootdir, 'lib/decompress/zstd_decompress.c'),
join_paths(zstd_rootdir, 'lib/decompress/zstd_decompress_block.c'),
join_paths(zstd_rootdir, 'lib/decompress/zstd_ddict.c'),
@@ -46,6 +45,15 @@ libzstd_sources = [join_paths(zstd_rootdir, 'lib/common/entropy_common.c'),
join_paths(zstd_rootdir, 'lib/dictBuilder/divsufsort.c'),
join_paths(zstd_rootdir, 'lib/dictBuilder/zdict.c')]
+# really we need anything that defines __GNUC__ as that is what ZSTD_ASM_SUPPORTED is gated on
+# but these are the two compilers that are supported in tree and actually handle this correctly
+# Otherwise, explicitly disable assmebly.
+if [compiler_gcc, compiler_clang].contains(cc_id)
+ libzstd_sources += join_paths(zstd_rootdir, 'lib/decompress/huf_decompress_amd64.S')
+else
+ add_project_arguments('-DZSTD_DISABLE_ASM', language: 'c')
+endif
+
# Explicit define legacy support
add_project_arguments('-DZSTD_LEGACY_SUPPORT=@0@'.format(legacy_level),
language: 'c')