Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ if cc.get_id() == 'msvc'
endforeach
endif

if get_option('reduce-namespace-pollution')
add_project_arguments('-DBSTRLIB_REDUCE_NAMESPACE_POLLUTION', language: 'c')
endif

if get_option('enable-fuzzing')
if cc.get_id() != 'clang'
error('Fuzz targets require clang (set CC=clang)')
Expand All @@ -52,6 +48,10 @@ add_project_arguments(warning_flags, language: 'c')
bstring_inc = include_directories(['.', 'bstring'])
conf_data = configuration_data()

if not get_option('enable-old-api')
conf_data.set('BSTRLIB_REDUCE_NAMESPACE_POLLUTION', 1)
endif

if get_option('enable-bgets-workaround')
conf_data.set('HAVE_BGETS', '1')
else
Expand Down
16 changes: 8 additions & 8 deletions meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ option(
description: 'Build libFuzzer fuzz targets (requires clang)',
)
option(
'fuzz-link-arg',
type: 'string',
value: '-fsanitize=fuzzer,address',
description: 'Linker flag used for fuzz targets (ClusterFuzzLite passes LIB_FUZZING_ENGINE here)',
'enable-old-api',
type: 'boolean',
value: false,
description: 'Enable backward compatibility macros for pre-1.0 API',
)
option(
'enable-tests',
Expand All @@ -35,8 +35,8 @@ option(
description: 'Build bstring library with UTF-8 support',
)
option(
'reduce-namespace-pollution',
type: 'boolean',
value: true,
description: 'Hide backward-compatibility macros in bstraux.h',
'fuzz-link-arg',
type: 'string',
value: '-fsanitize=fuzzer,address',
description: 'Linker flag used for fuzz targets (ClusterFuzzLite passes LIB_FUZZING_ENGINE here)',
)
Loading