meson: Drop project_source_root and project_build_root variables

We can now rely on meson.project_source_root() and meson.project_build_root()
which do the same thing.
This commit is contained in:
Daan De Meyer
2025-03-26 13:57:33 +01:00
parent d22ffb44c1
commit b4b1d94a09
7 changed files with 31 additions and 35 deletions

View File

@@ -55,7 +55,7 @@ sanitize_address_undefined = custom_target(
'sanitize-address-undefined-fuzzers',
output : 'sanitize-address-undefined-fuzzers',
command : [meson_build_sh,
project_source_root,
meson.project_source_root(),
'@OUTPUT@',
'fuzzers',
' '.join(fuzz_c_args + '-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION'),
@@ -71,13 +71,13 @@ sanitize_address_undefined = custom_target(
fuzz_sanitizers = [['address,undefined', sanitize_address_undefined]]
fuzz_testsdir = 'test/fuzz'
if git.found() and fs.is_dir(project_source_root / '.git')
if git.found() and fs.is_dir(meson.project_source_root() / '.git')
out = run_command(env, '-u', 'GIT_WORK_TREE',
git, '--git-dir=@0@/.git'.format(project_source_root),
git, '--git-dir=@0@/.git'.format(meson.project_source_root()),
'ls-files', ':/@0@/*/*'.format(fuzz_testsdir),
check: true)
else
out = run_command(sh, '-c', 'cd "@0@"; echo @1@/*/*'.format(project_source_root, fuzz_testsdir), check: true)
out = run_command(sh, '-c', 'cd "@0@"; echo @1@/*/*'.format(meson.project_source_root(), fuzz_testsdir), check: true)
endif
# Add crafted fuzz inputs we have in the repo