diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
commit | d8bbc7858622b6d9c278469aab701ca0b609cddf (patch) | |
tree | eff41dc61d9f714852212739e6b3738b82a2af87 /third_party/zstd/moz.build | |
parent | Releasing progress-linux version 125.0.3-1~progress7.99u1. (diff) | |
download | firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.zip |
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | third_party/zstd/moz.build | 107 |
1 files changed, 107 insertions, 0 deletions
diff --git a/third_party/zstd/moz.build b/third_party/zstd/moz.build new file mode 100644 index 0000000000..6bcc264981 --- /dev/null +++ b/third_party/zstd/moz.build @@ -0,0 +1,107 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +with Files('**'): + BUG_COMPONENT = ('Core', 'Networking') + +EXPORTS.zstd += [ + 'lib/zstd.h', +] + +UNIFIED_SOURCES += [ + 'lib/common/debug.c', + 'lib/common/entropy_common.c', + 'lib/common/error_private.c', + 'lib/common/fse_decompress.c', + 'lib/common/pool.c', + 'lib/common/threading.c', + 'lib/common/xxhash.c', + 'lib/common/zstd_common.c', + 'lib/decompress/huf_decompress.c', + 'lib/decompress/zstd_ddict.c', + 'lib/decompress/zstd_decompress.c', + 'lib/decompress/zstd_decompress_block.c', +] + +# we aren't using these currently +#COMPRESS_SOURCES = [ +# 'lib/compress/fse_compress.c', +# 'lib/compress/hist.c', +# 'lib/compress/huf_compress.c', +# 'lib/compress/zstd_compress.c', +# 'lib/compress/zstd_compress_literals.c', +# 'lib/compress/zstd_compress_sequences.c', +# 'lib/compress/zstd_compress_superblock.c', +# 'lib/compress/zstd_double_fast.c', +# 'lib/compress/zstd_fast.c', +# 'lib/compress/zstd_lazy.c', +# 'lib/compress/zstd_ldm.c', +# 'lib/compress/zstd_opt.c', +# 'lib/compress/zstdmt_compress.c', +#] + +CFLAGS += [ + '-Wall', + '-Wextra', + '-Wcast-qual', + '-Wcast-align', + '-Wshadow', + '-Wstrict-aliasing=1', + '-Wswitch-enum', + '-Wdeclaration-after-statement', + '-Wstrict-prototypes', + '-Wundef', + '-Wpointer-arith', + '-Wvla', + '-Wformat=2', + '-Winit-self', + '-Wfloat-equal', + '-Wwrite-strings', + '-Wredundant-decls', + '-Wmissing-prototypes', + '-Wc++-compat' +] + +CXXFLAGS += [ + '-DXXH_NAMESPACE=ZSTD_', + '-DDEBUGLEVEL=0', + '-DZSTD_MULTITHREAD=1', +] + +LOCAL_INCLUDES += [ 'lib/decompress' ] + +# .S assembler format is incompatible with Microsoft MASM, disable for now +if CONFIG["OS_ARCH"] == "WINNT": + CXXFLAGS += [ '-DZSTD_DISABLE_ASM=1' ] +else: + # If the assembler format is made compatible, we still need to preprocess it + if CONFIG["TARGET_CPU"] == "x86_64" and CONFIG["OS_ARCH"] == "WINNT": + if CONFIG["CC_TYPE"] == "clang-cl": + # libffi asm needs to be preprocessed for MSVC's assembler + GeneratedFile("win64_intel.asm", + inputs=[ + "lib/decompress/huf_decompress_amd64.S", + ], + script="preprocess_asm.py", + flags=["$(DEFINES)", "$(LOCAL_INCLUDES)"], + ) + SOURCES += ["!win64_intel.asm"] + else: + SOURCES += [ + 'lib/decompress/huf_decompress_amd64.S', + ] + else: + SOURCES += [ + 'lib/decompress/huf_decompress_amd64.S', + ] + +# We allow warnings for third-party code that can be updated from upstream. +AllowCompilerWarnings() + +Library('zstd') + +FINAL_LIBRARY = 'xul' + |