mirror of https://code.videolan.org/videolan/vlc
meson: add extra_checks do add more compilation errors
These are the same options we already use in build scripts.
This commit is contained in:
parent
fded16c5cd
commit
8f3d984910
10
meson.build
10
meson.build
|
@ -476,6 +476,16 @@ add_project_arguments(cc.get_supported_arguments([
|
|||
'-pipe'
|
||||
]), language: ['c'])
|
||||
|
||||
if get_option('extra_checks')
|
||||
add_project_arguments(cc.get_supported_arguments([
|
||||
'-Werror=missing-field-initializers'
|
||||
]), language: ['c', 'cpp'])
|
||||
add_project_arguments(cc.get_supported_arguments([
|
||||
'-Werror=incompatible-pointer-types',
|
||||
'-Werror=restrict'
|
||||
]), language: ['c'])
|
||||
endif
|
||||
|
||||
if get_option('branch_protection') \
|
||||
.require(host_machine.cpu_family() == 'aarch64', error_message: 'Branch protection is only available for AArch64') \
|
||||
.require(cc.has_argument('-mbranch-protection=standard'), error_message: 'Compiler does not support `-mbranch-protection`') \
|
||||
|
|
|
@ -50,6 +50,11 @@ option('ssp',
|
|||
value : 'auto',
|
||||
description : 'Stack smashing protection')
|
||||
|
||||
option('extra_checks',
|
||||
type : 'boolean',
|
||||
value : false,
|
||||
description : 'Turn some warnings into compilation error')
|
||||
|
||||
option('winstore_app',
|
||||
type : 'boolean',
|
||||
value : false,
|
||||
|
|
Loading…
Reference in New Issue