mirror of
https://github.com/facebook/zstd.git
synced 2025-03-07 01:10:04 +02:00
Merge pull request #3039 from eli-schwartz/meson
Meson fixups for Windows
This commit is contained in:
commit
66633f9386
@ -92,8 +92,8 @@ matrix:
|
|||||||
- make -C tests versionsTest
|
- make -C tests versionsTest
|
||||||
|
|
||||||
# meson dedicated test
|
# meson dedicated test
|
||||||
- name: Xenial (Meson + clang) # ~15mn
|
- name: Focal (Meson + clang) # ~15mn
|
||||||
dist: bionic
|
dist: focal
|
||||||
language: cpp
|
language: cpp
|
||||||
compiler: clang
|
compiler: clang
|
||||||
install:
|
install:
|
||||||
|
@ -83,7 +83,8 @@ libzstd_c_args = []
|
|||||||
if cc_id == compiler_msvc
|
if cc_id == compiler_msvc
|
||||||
if default_library_type != 'static'
|
if default_library_type != 'static'
|
||||||
libzstd_sources += [windows_mod.compile_resources(
|
libzstd_sources += [windows_mod.compile_resources(
|
||||||
join_paths(zstd_rootdir, 'build/VS2010/libzstd-dll/libzstd-dll.rc'))]
|
join_paths(zstd_rootdir, 'build/VS2010/libzstd-dll/libzstd-dll.rc'),
|
||||||
|
include_directories: libzstd_includes)]
|
||||||
libzstd_c_args += ['-DZSTD_DLL_EXPORT=1',
|
libzstd_c_args += ['-DZSTD_DLL_EXPORT=1',
|
||||||
'-DZSTD_HEAPMODE=0',
|
'-DZSTD_HEAPMODE=0',
|
||||||
'-D_CONSOLE',
|
'-D_CONSOLE',
|
||||||
|
@ -92,7 +92,7 @@ feature_lz4 = get_option('lz4')
|
|||||||
# Dependencies
|
# Dependencies
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
|
|
||||||
libm_dep = cc.find_library('m', required: bin_tests)
|
libm_dep = cc.find_library('m', required: false)
|
||||||
thread_dep = dependency('threads', required: feature_multi_thread)
|
thread_dep = dependency('threads', required: feature_multi_thread)
|
||||||
use_multi_thread = thread_dep.found()
|
use_multi_thread = thread_dep.found()
|
||||||
# Arguments in dependency should be equivalent to those passed to pkg-config
|
# Arguments in dependency should be equivalent to those passed to pkg-config
|
||||||
|
@ -66,7 +66,8 @@ endif
|
|||||||
if cc_id == compiler_msvc
|
if cc_id == compiler_msvc
|
||||||
if default_library_type != 'static'
|
if default_library_type != 'static'
|
||||||
zstd_programs_sources += [windows_mod.compile_resources(
|
zstd_programs_sources += [windows_mod.compile_resources(
|
||||||
join_paths(zstd_rootdir, 'build/VS2010/zstd/zstd.rc'))]
|
join_paths(zstd_rootdir, 'build/VS2010/zstd/zstd.rc'),
|
||||||
|
include_directories: libzstd_includes)]
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ def valgrindTest(valgrind, datagen, fuzzer, zstd, fullbench):
|
|||||||
|
|
||||||
if subprocess.call([*VALGRIND_ARGS, zstd],
|
if subprocess.call([*VALGRIND_ARGS, zstd],
|
||||||
stdout=subprocess.DEVNULL) == 0:
|
stdout=subprocess.DEVNULL) == 0:
|
||||||
raise subprocess.CalledProcessError('zstd without argument should have failed')
|
raise subprocess.SubprocessError('zstd without argument should have failed')
|
||||||
|
|
||||||
with subprocess.Popen([datagen, '-g80'], stdout=subprocess.PIPE) as p1, \
|
with subprocess.Popen([datagen, '-g80'], stdout=subprocess.PIPE) as p1, \
|
||||||
subprocess.Popen([*VALGRIND_ARGS, zstd, '-', '-c'],
|
subprocess.Popen([*VALGRIND_ARGS, zstd, '-', '-c'],
|
||||||
@ -30,7 +30,7 @@ def valgrindTest(valgrind, datagen, fuzzer, zstd, fullbench):
|
|||||||
p1.stdout.close() # Allow p1 to receive a SIGPIPE if p2 exits.
|
p1.stdout.close() # Allow p1 to receive a SIGPIPE if p2 exits.
|
||||||
p2.communicate()
|
p2.communicate()
|
||||||
if p2.returncode != 0:
|
if p2.returncode != 0:
|
||||||
raise subprocess.CalledProcessError()
|
raise subprocess.SubprocessError()
|
||||||
|
|
||||||
with subprocess.Popen([datagen, '-g16KB'], stdout=subprocess.PIPE) as p1, \
|
with subprocess.Popen([datagen, '-g16KB'], stdout=subprocess.PIPE) as p1, \
|
||||||
subprocess.Popen([*VALGRIND_ARGS, zstd, '-vf', '-', '-c'],
|
subprocess.Popen([*VALGRIND_ARGS, zstd, '-vf', '-', '-c'],
|
||||||
@ -39,7 +39,7 @@ def valgrindTest(valgrind, datagen, fuzzer, zstd, fullbench):
|
|||||||
p1.stdout.close()
|
p1.stdout.close()
|
||||||
p2.communicate()
|
p2.communicate()
|
||||||
if p2.returncode != 0:
|
if p2.returncode != 0:
|
||||||
raise subprocess.CalledProcessError()
|
raise subprocess.SubprocessError()
|
||||||
|
|
||||||
with tempfile.NamedTemporaryFile() as tmp_fd:
|
with tempfile.NamedTemporaryFile() as tmp_fd:
|
||||||
with subprocess.Popen([datagen, '-g2930KB'], stdout=subprocess.PIPE) as p1, \
|
with subprocess.Popen([datagen, '-g2930KB'], stdout=subprocess.PIPE) as p1, \
|
||||||
@ -48,7 +48,7 @@ def valgrindTest(valgrind, datagen, fuzzer, zstd, fullbench):
|
|||||||
p1.stdout.close()
|
p1.stdout.close()
|
||||||
p2.communicate()
|
p2.communicate()
|
||||||
if p2.returncode != 0:
|
if p2.returncode != 0:
|
||||||
raise subprocess.CalledProcessError()
|
raise subprocess.SubprocessError()
|
||||||
|
|
||||||
subprocess.check_call([*VALGRIND_ARGS, zstd, '-vdf', tmp_fd.name, '-c'],
|
subprocess.check_call([*VALGRIND_ARGS, zstd, '-vdf', tmp_fd.name, '-c'],
|
||||||
stdout=subprocess.DEVNULL)
|
stdout=subprocess.DEVNULL)
|
||||||
@ -60,7 +60,7 @@ def valgrindTest(valgrind, datagen, fuzzer, zstd, fullbench):
|
|||||||
p1.stdout.close()
|
p1.stdout.close()
|
||||||
p2.communicate()
|
p2.communicate()
|
||||||
if p2.returncode != 0:
|
if p2.returncode != 0:
|
||||||
raise subprocess.CalledProcessError()
|
raise subprocess.SubprocessError()
|
||||||
|
|
||||||
subprocess.check_call([*VALGRIND_ARGS, fuzzer, '-T1mn', '-t1'])
|
subprocess.check_call([*VALGRIND_ARGS, fuzzer, '-T1mn', '-t1'])
|
||||||
subprocess.check_call([*VALGRIND_ARGS, fullbench, '-i1'])
|
subprocess.check_call([*VALGRIND_ARGS, fullbench, '-i1'])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user