mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-10-01 13:55:36 +00:00
meson: Rename cflags variable
The variable holding the compiler flags, `cflags`, has been renamed to `c_flags` to be consistent with the rest of build files. Different objects used in the `test-dispatcher-envp` target have been grouped together. The dependency over the `libnm` library has been removed as it is unnecessary.
This commit is contained in:
parent
70da6993c8
commit
096748a196
|
@ -26,7 +26,7 @@ deps = [
|
|||
readline_dep,
|
||||
]
|
||||
|
||||
cflags = clients_cflags + [
|
||||
c_flags = clients_c_flags + [
|
||||
'-DG_LOG_DOMAIN="@0@"'.format(name),
|
||||
]
|
||||
|
||||
|
@ -40,7 +40,7 @@ executable(
|
|||
name,
|
||||
sources,
|
||||
dependencies: deps,
|
||||
c_args: cflags,
|
||||
c_args: c_flags,
|
||||
link_args: ldflags_linker_script_binary,
|
||||
link_depends: linker_script_binary,
|
||||
install: true,
|
||||
|
|
|
@ -8,7 +8,7 @@ deps = [
|
|||
libnm_nm_default_dep,
|
||||
]
|
||||
|
||||
cflags = clients_cflags + [
|
||||
c_flags = clients_c_flags + [
|
||||
'-DG_LOG_DOMAIN="libnmc"',
|
||||
]
|
||||
|
||||
|
@ -20,7 +20,7 @@ libnmc_base = static_library(
|
|||
'nm-vpn-helpers.c',
|
||||
),
|
||||
dependencies: deps,
|
||||
c_args: cflags,
|
||||
c_args: c_flags,
|
||||
)
|
||||
|
||||
libnmc_base_dep = declare_dependency(
|
||||
|
@ -63,7 +63,7 @@ libnmc = static_library(
|
|||
'nm-meta-setting-desc.c',
|
||||
) + nm_meta_setting_source + [settings_docs_source],
|
||||
dependencies: deps,
|
||||
c_args: cflags,
|
||||
c_args: c_flags,
|
||||
link_with: libnmc_base,
|
||||
link_depends: settings_docs_source,
|
||||
)
|
||||
|
|
|
@ -9,7 +9,7 @@ exe = executable(
|
|||
libnmc_base_dep,
|
||||
libnm_nm_default_dep,
|
||||
],
|
||||
c_args: clients_cflags + [
|
||||
c_args: clients_c_flags + [
|
||||
'-DNETWORKMANAGER_COMPILATION_TEST',
|
||||
],
|
||||
)
|
||||
|
|
|
@ -5,11 +5,11 @@ deps = [
|
|||
libnm_nm_default_dep,
|
||||
]
|
||||
|
||||
clients_cflags = [
|
||||
clients_c_flags = [
|
||||
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_CLIENT',
|
||||
]
|
||||
|
||||
cflags = clients_cflags + [
|
||||
c_flags = clients_c_flags + [
|
||||
'-DG_LOG_DOMAIN="@0@"'.format(name),
|
||||
]
|
||||
|
||||
|
@ -17,7 +17,7 @@ executable(
|
|||
name,
|
||||
name + '.c',
|
||||
dependencies: deps,
|
||||
c_args: cflags,
|
||||
c_args: c_flags,
|
||||
link_args: ldflags_linker_script_binary,
|
||||
link_depends: linker_script_binary,
|
||||
install: true,
|
||||
|
|
|
@ -5,7 +5,7 @@ deps = [
|
|||
newt_dep,
|
||||
]
|
||||
|
||||
cflags = clients_cflags + [
|
||||
c_flags = clients_c_flags + [
|
||||
'-DG_LOG_DOMAIN="@0@"'.format(name),
|
||||
]
|
||||
|
||||
|
@ -66,7 +66,7 @@ executable(
|
|||
name,
|
||||
sources,
|
||||
dependencies: deps,
|
||||
c_args: cflags,
|
||||
c_args: c_flags,
|
||||
link_with: libnm_systemd_logging_stub,
|
||||
link_args: ldflags_linker_script_binary,
|
||||
link_depends: linker_script_binary,
|
||||
|
|
|
@ -26,7 +26,7 @@ libnmt_newt = static_library(
|
|||
sources: sources + [libnm_enum_sources[1]],
|
||||
include_directories: libnm_inc,
|
||||
dependencies: deps,
|
||||
c_args: cflags,
|
||||
c_args: c_flags,
|
||||
)
|
||||
|
||||
libnmt_newt_dep = declare_dependency(
|
||||
|
|
|
@ -137,18 +137,18 @@ common_ldflags = []
|
|||
|
||||
enable_ld_gc = get_option('ld_gc')
|
||||
if enable_ld_gc
|
||||
test_cflags = [
|
||||
test_c_flags = [
|
||||
'-fdata-sections',
|
||||
'-ffunction-sections',
|
||||
]
|
||||
|
||||
test_ldflags = ['-Wl,--gc-sections']
|
||||
|
||||
foreach cflag: test_cflags + test_ldflags
|
||||
foreach cflag: test_c_flags + test_ldflags
|
||||
assert(cc.has_argument(cflag), 'Unused symbol eviction requested but not supported. Use -Dld_gc=false to build without it.')
|
||||
endforeach
|
||||
|
||||
common_flags += test_cflags
|
||||
common_flags += test_c_flags
|
||||
common_ldflags += test_ldflags
|
||||
endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue