Commit afa5479f authored by Marvin Scholz's avatar Marvin Scholz

Build: Add checkasm test

parent 190da6ae
......@@ -173,9 +173,9 @@ cdata.set10('HAVE_ASM', is_asm_enabled)
# Generate config headers
#
if cdata.has('HAVE_GETOPT_H')
dav1d_inc_dirs = include_directories(['include', 'include/dav1d'])
dav1d_inc_dirs = include_directories(['.', 'include', 'include/dav1d'])
else
dav1d_inc_dirs = include_directories(['include', 'include/dav1d', 'include/compat'])
dav1d_inc_dirs = include_directories(['.', 'include', 'include/dav1d', 'include/compat'])
endif
config_h_target = configure_file(output: 'config.h', configuration: cdata)
......@@ -269,7 +269,7 @@ if is_asm_enabled
depfile: '@BASENAME@.obj.ndep',
arguments: [
'-f', nasm_format,
'-I', '@CURRENT_SOURCE_DIR@/',
'-I', '@SOURCE_DIR@/',
'-MQ', '@OUTPUT@', '-MF', '@DEPFILE@',
'@EXTRA_ARGS@',
'@INPUT@',
......@@ -312,14 +312,21 @@ if host_machine.system() == 'windows'
#entrypoints_objs += rc_source
endif
libdav1d = library('dav1d',
libdav1d_private = static_library('dav1d_private',
libdav1d_sources, nasm_objs,
version: meson.project_version(),
objects: [bitdepth_objs, entrypoints_objs],
include_directories: dav1d_inc_dirs,
c_args: [stackalign_flag],
dependencies: thread_dependency,
install: true
install: false,
build_by_default: false,
)
libdav1d = library('dav1d',
version: '0.0.1',
link_whole: libdav1d_private,
install: true,
)
install_subdir('include/dav1d/', install_dir: 'include')
......@@ -349,6 +356,8 @@ dav1d = executable('dav1d',
install: true,
)
subdir('tests')
#
# pkg-config boilerplate
#
......
if is_asm_enabled
checkasm_sources = files('checkasm/checkasm.c')
checkasm_tmpl_sources = files('checkasm/mc.c')
checkasm_bitdepth_objs = []
foreach bitdepth : dav1d_bitdepths
checkasm_bitdepth_lib = static_library(
'checkasm_bitdepth_@0@'.format(bitdepth),
checkasm_tmpl_sources,
include_directories: dav1d_inc_dirs,
c_args: ['-DBITDEPTH=@0@'.format(bitdepth), stackalign_flag],
install: false,
build_by_default: false,
)
checkasm_bitdepth_objs += checkasm_bitdepth_lib.extract_all_objects()
endforeach
checkasm_nasm_objs = nasm_gen.process(files('checkasm/x86/checkasm.asm'))
checkasm = executable('checkasm', checkasm_sources, checkasm_nasm_objs,
objects: [checkasm_bitdepth_objs],
include_directories: dav1d_inc_dirs,
link_with: libdav1d_private,
c_args: [stackalign_flag, stackrealign_flag],
build_by_default: false,
)
test('checkasm test', checkasm)
endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment