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:
Iñigo Martínez 2019-09-11 11:10:08 +02:00 committed by Thomas Haller
parent 70da6993c8
commit 096748a196
7 changed files with 15 additions and 15 deletions

View file

@ -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,

View file

@ -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,
)

View file

@ -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',
],
)

View file

@ -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,

View file

@ -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,

View file

@ -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(

View file

@ -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