aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorAlexander Bulekov <alxndr@bu.edu>2020-09-02 13:36:50 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2020-09-08 11:43:16 +0200
commitc46f76d15869be27e5c9420f6a1733c3cfafc1a1 (patch)
tree07703f5bd6584813ea17d7f87e590ae825f91784 /meson.build
parent789035f1239054331b335801a06bdbef026f02e1 (diff)
meson: specify fuzz linker script as a project arg
With this change, the fuzzer-linker script should be specified outside any --start-group/--end-group pairs. We need this on oss-fuzz, where partially applying the linker-script results in a linker failure Signed-off-by: Alexander Bulekov <alxndr@bu.edu> Message-Id: <20200902173652.307222-2-alxndr@bu.edu> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build9
1 files changed, 8 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index 071ef2688a..64e5e8af3e 100644
--- a/meson.build
+++ b/meson.build
@@ -58,6 +58,14 @@ add_project_link_arguments(config_host['QEMU_LDFLAGS'].split(),
add_project_arguments(config_host['QEMU_INCLUDES'].split(),
language: ['c', 'cpp', 'objc'])
+# Specify linker-script with add_project_link_arguments so that it is not placed
+# within a linker --start-group/--end-group pair
+if 'CONFIG_FUZZ' in config_host
+ add_project_link_arguments(['-Wl,-T,',
+ (meson.current_source_dir() / 'tests/qtest/fuzz/fork_fuzz.ld')],
+ native: false, language: ['c', 'cpp', 'objc'])
+endif
+
link_language = meson.get_external_property('link_language', 'cpp')
if link_language == 'cpp'
add_languages('cpp', required: true, native: false)
@@ -1084,7 +1092,6 @@ foreach target : target_dirs
'gui': false,
'sources': specific_fuzz.sources(),
'dependencies': specific_fuzz.dependencies(),
- 'link_depends': [files('tests/qtest/fuzz/fork_fuzz.ld')],
}]
endif
else