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:
commit
9a9f9cc22a
@ -24,6 +24,7 @@ want_textui = get_option('without-textui') != 'yes'
|
|||||||
want_bot = get_option('with-bot') == 'yes'
|
want_bot = get_option('with-bot') == 'yes'
|
||||||
want_fuzzer = get_option('with-fuzzer') == 'yes'
|
want_fuzzer = get_option('with-fuzzer') == 'yes'
|
||||||
fuzzer_lib = get_option('with-fuzzer-lib')
|
fuzzer_lib = get_option('with-fuzzer-lib')
|
||||||
|
fuzzer_link_language = get_option('fuzzer-link-language')
|
||||||
want_proxy = get_option('with-proxy') == 'yes'
|
want_proxy = get_option('with-proxy') == 'yes'
|
||||||
want_truecolor = get_option('enable-true-color') == 'yes'
|
want_truecolor = get_option('enable-true-color') == 'yes'
|
||||||
want_gregex = get_option('disable-gregex') != '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?')
|
error('compiler does not support -fsanitize=fuzzer-no-link, try clang?')
|
||||||
endif
|
endif
|
||||||
add_project_arguments('-fsanitize=fuzzer-no-link', language : 'c')
|
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
|
endif
|
||||||
|
|
||||||
##############
|
##############
|
||||||
|
@ -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-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', 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('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-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-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'])
|
option('with-perl', type : 'combo', description : 'Build with Perl support', choices : ['auto', 'yes', 'no'])
|
||||||
|
@ -10,6 +10,7 @@ executable('theme-load-fuzz',
|
|||||||
libfuzzer_fe_common_core_a,
|
libfuzzer_fe_common_core_a,
|
||||||
],
|
],
|
||||||
link_args : [fuzzer_lib],
|
link_args : [fuzzer_lib],
|
||||||
|
link_language : fuzzer_link_language,
|
||||||
include_directories : rootinc,
|
include_directories : rootinc,
|
||||||
implicit_include_directories : false,
|
implicit_include_directories : false,
|
||||||
install : true,
|
install : true,
|
||||||
|
@ -12,6 +12,7 @@ executable('event-get-params-fuzz',
|
|||||||
libfuzzer_fe_common_core_a,
|
libfuzzer_fe_common_core_a,
|
||||||
],
|
],
|
||||||
link_args : [fuzzer_lib],
|
link_args : [fuzzer_lib],
|
||||||
|
link_language : fuzzer_link_language,
|
||||||
include_directories : rootinc,
|
include_directories : rootinc,
|
||||||
implicit_include_directories : false,
|
implicit_include_directories : false,
|
||||||
install : true,
|
install : true,
|
||||||
|
@ -14,6 +14,7 @@ executable('irssi-fuzz',
|
|||||||
libfuzzer_fe_common_core_a,
|
libfuzzer_fe_common_core_a,
|
||||||
],
|
],
|
||||||
link_args : [fuzzer_lib],
|
link_args : [fuzzer_lib],
|
||||||
|
link_language : fuzzer_link_language,
|
||||||
include_directories : rootinc,
|
include_directories : rootinc,
|
||||||
implicit_include_directories : false,
|
implicit_include_directories : false,
|
||||||
install : true,
|
install : true,
|
||||||
@ -35,6 +36,7 @@ executable('server-fuzz',
|
|||||||
libfe_irc_notifylist_a,
|
libfe_irc_notifylist_a,
|
||||||
],
|
],
|
||||||
link_args : [fuzzer_lib],
|
link_args : [fuzzer_lib],
|
||||||
|
link_language : fuzzer_link_language,
|
||||||
include_directories : rootinc,
|
include_directories : rootinc,
|
||||||
implicit_include_directories : false,
|
implicit_include_directories : false,
|
||||||
install : true,
|
install : true,
|
||||||
|
Loading…
Reference in New Issue
Block a user