1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

Merge pull request #1125 from ailin-nemui/fuzz-link-lang

add new meson build option -Dfuzzer-link-language=cpp for oss-fuzz
This commit is contained in:
ailin-nemui 2019-09-05 15:46:35 +02:00 committed by GitHub
commit 9a9f9cc22a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 1 deletions

View File

@ -24,6 +24,7 @@ want_textui = get_option('without-textui') != 'yes'
want_bot = get_option('with-bot') == 'yes'
want_fuzzer = get_option('with-fuzzer') == 'yes'
fuzzer_lib = get_option('with-fuzzer-lib')
fuzzer_link_language = get_option('fuzzer-link-language')
want_proxy = get_option('with-proxy') == 'yes'
want_truecolor = get_option('enable-true-color') == 'yes'
want_gregex = get_option('disable-gregex') != 'yes'
@ -459,7 +460,10 @@ if want_fuzzer
error('compiler does not support -fsanitize=fuzzer-no-link, try clang?')
endif
add_project_arguments('-fsanitize=fuzzer-no-link', language : 'c')
add_project_link_arguments('-fsanitize=fuzzer-no-link', language : 'c')
if (fuzzer_link_language != 'c')
add_languages(fuzzer_link_language)
endif
add_project_link_arguments('-fsanitize=fuzzer-no-link', language : fuzzer_link_language)
endif
##############

View File

@ -2,6 +2,7 @@ option('without-textui', type : 'combo', description : 'Build without text f
option('with-bot', type : 'combo', description : 'Build irssi-bot', choices : ['no', 'yes'])
option('with-fuzzer', type : 'combo', description : 'Build irssi-fuzzer', choices : ['no', 'yes'])
option('with-fuzzer-lib', type : 'string', description : 'Specify path to fuzzer library', value : '-fsanitize=fuzzer')
option('fuzzer-link-language', type : 'string', description : 'The linker to use for the fuzz targets [c, cpp]', value : 'c')
option('with-proxy', type : 'combo', description : 'Build irssi-proxy', choices : ['no', 'yes'])
option('with-perl-lib', type : 'string', description : 'Specify where to install the Perl libraries for Irssi')
option('with-perl', type : 'combo', description : 'Build with Perl support', choices : ['auto', 'yes', 'no'])

View File

@ -10,6 +10,7 @@ executable('theme-load-fuzz',
libfuzzer_fe_common_core_a,
],
link_args : [fuzzer_lib],
link_language : fuzzer_link_language,
include_directories : rootinc,
implicit_include_directories : false,
install : true,

View File

@ -12,6 +12,7 @@ executable('event-get-params-fuzz',
libfuzzer_fe_common_core_a,
],
link_args : [fuzzer_lib],
link_language : fuzzer_link_language,
include_directories : rootinc,
implicit_include_directories : false,
install : true,

View File

@ -14,6 +14,7 @@ executable('irssi-fuzz',
libfuzzer_fe_common_core_a,
],
link_args : [fuzzer_lib],
link_language : fuzzer_link_language,
include_directories : rootinc,
implicit_include_directories : false,
install : true,
@ -35,6 +36,7 @@ executable('server-fuzz',
libfe_irc_notifylist_a,
],
link_args : [fuzzer_lib],
link_language : fuzzer_link_language,
include_directories : rootinc,
implicit_include_directories : false,
install : true,