mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-03 16:20:14 +01:00
Merge branch 'ac/meson_improvements' into 'master'
ac/meson improvements See merge request NetworkManager/NetworkManager!369
This commit is contained in:
commit
924c20bf55
2 changed files with 18 additions and 9 deletions
|
|
@ -249,9 +249,6 @@
|
|||
/* Define to 1 if you need to in order for `stat' and other things to work. */
|
||||
#mesondefine _POSIX_SOURCE
|
||||
|
||||
/* Define to `int' if <sys/types.h> does not define. */
|
||||
#mesondefine pid_t
|
||||
|
||||
#mesondefine HAVE_PIDFD_OPEN
|
||||
#mesondefine HAVE_PIDFD_SEND_SIGNAL
|
||||
#mesondefine HAVE_RT_SIGQUEUEINFO
|
||||
|
|
|
|||
24
meson.build
24
meson.build
|
|
@ -10,7 +10,7 @@ project(
|
|||
'buildtype=debugoptimized',
|
||||
'c_std=gnu11',
|
||||
],
|
||||
meson_version: '>= 0.44.0',
|
||||
meson_version: '>= 0.46.0',
|
||||
)
|
||||
|
||||
nm_name = meson.project_name()
|
||||
|
|
@ -137,10 +137,6 @@ config_h.set('SIZEOF_INO_T', cc.sizeof('ino_t', prefix : '#include <sys/types.h>
|
|||
config_h.set('SIZEOF_TIME_T', cc.sizeof('time_t', prefix : '#include <sys/time.h>'))
|
||||
config_h.set('SIZEOF_RLIM_T', cc.sizeof('rlim_t', prefix : '#include <sys/resource.h>'))
|
||||
|
||||
if not cc.has_type('pid_t', prefix: '#include <sys/types.h>')
|
||||
config_h.set('pid_t', 'int')
|
||||
endif
|
||||
|
||||
# compiler flags
|
||||
common_flags = []
|
||||
common_ldflags = []
|
||||
|
|
@ -154,10 +150,14 @@ if enable_ld_gc
|
|||
|
||||
test_ldflags = ['-Wl,--gc-sections']
|
||||
|
||||
foreach cflag: test_c_flags + test_ldflags
|
||||
foreach cflag: test_c_flags
|
||||
assert(cc.has_argument(cflag), 'Unused symbol eviction requested but not supported. Use -Dld_gc=false to build without it.')
|
||||
endforeach
|
||||
|
||||
foreach ldflag: test_ldflags
|
||||
assert(cc.has_link_argument(ldflag), 'Linker garbage collection requested but not supported. Use -Dld_gc=false to build without it.')
|
||||
endforeach
|
||||
|
||||
common_flags += test_c_flags
|
||||
common_ldflags += test_ldflags
|
||||
endif
|
||||
|
|
@ -173,16 +173,28 @@ endif
|
|||
|
||||
if nm_debug
|
||||
common_flags += cc.get_supported_arguments([
|
||||
'-Wall',
|
||||
'-Wextra',
|
||||
'-Wdeclaration-after-statement',
|
||||
'-Wfloat-equal',
|
||||
'-Wformat-nonliteral',
|
||||
'-Wformat-security',
|
||||
'-Wimplicit-fallthrough',
|
||||
'-Wimplicit-function-declaration',
|
||||
'-Winit-self',
|
||||
'-Wlogical-op',
|
||||
'-Wmissing-declarations',
|
||||
'-Wmissing-include-dirs',
|
||||
'-Wmissing-prototypes',
|
||||
'-Wpointer-arith',
|
||||
'-Wshadow',
|
||||
'-Wshift-negative-value',
|
||||
'-Wstrict-prototypes',
|
||||
'-Wundef',
|
||||
'-Wvla',
|
||||
'-Wno-duplicate-decl-specifier',
|
||||
'-Wno-format-truncation',
|
||||
'-Wno-format-y2k',
|
||||
'-Wno-gnu-variable-sized-type-not-at-end',
|
||||
'-Wno-missing-field-initializers',
|
||||
'-Wno-pragmas',
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue