[v3,12/12] build: add dependency on telemetry to apps in meson

Message ID 20181010105134.48079-13-kevin.laatz@intel.com
State Superseded
Delegated to: Thomas Monjalon
Headers show
Series
  • introduce telemetry library
Related show

Checks

Context Check Description
ci/Intel-compilation fail Compilation issues
ci/checkpatch success coding style OK

Commit Message

Laatz, Kevin Oct. 10, 2018, 10:51 a.m.
This patch adds telemetry as a dependecy to all applications. Without these
changes, the --telemetry flag will not be recognised and applications will
fail to run if they want to enable telemetry.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
---
 app/meson.build                  | 4 ++--
 app/pdump/meson.build            | 2 +-
 app/proc-info/meson.build        | 2 +-
 app/test-bbdev/meson.build       | 2 +-
 app/test-crypto-perf/meson.build | 2 +-
 app/test-pmd/meson.build         | 2 +-
 config/meson.build               | 3 +++
 lib/meson.build                  | 1 +
 meson.build                      | 1 +
 9 files changed, 12 insertions(+), 7 deletions(-)

Patch

diff --git a/app/meson.build b/app/meson.build
index 99e0b93..8e716bf 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -24,7 +24,7 @@  foreach app:apps
 	# use "deps" for internal DPDK dependencies, and "ext_deps" for
 	# external package/library requirements
 	ext_deps = []
-	deps = []
+	deps = ['telemetry']
 
 	subdir(name)
 
@@ -38,7 +38,7 @@  foreach app:apps
 
 		link_libs = []
 		if get_option('default_library') == 'static'
-			link_libs = dpdk_drivers
+			link_libs = dpdk_static_libraries + dpdk_drivers
 		endif
 
 		if allow_experimental_apis
diff --git a/app/pdump/meson.build b/app/pdump/meson.build
index 988cb4e..116c27f 100644
--- a/app/pdump/meson.build
+++ b/app/pdump/meson.build
@@ -3,4 +3,4 @@ 
 
 sources = files('main.c')
 allow_experimental_apis = true
-deps = ['ethdev', 'kvargs', 'pdump']
+deps += ['ethdev', 'kvargs', 'pdump']
diff --git a/app/proc-info/meson.build b/app/proc-info/meson.build
index 9c148e3..a52b2ee 100644
--- a/app/proc-info/meson.build
+++ b/app/proc-info/meson.build
@@ -3,4 +3,4 @@ 
 
 sources = files('main.c')
 allow_experimental_apis = true
-deps = ['ethdev', 'metrics']
+deps += ['ethdev', 'metrics']
diff --git a/app/test-bbdev/meson.build b/app/test-bbdev/meson.build
index 653907d..eb8cc04 100644
--- a/app/test-bbdev/meson.build
+++ b/app/test-bbdev/meson.build
@@ -6,4 +6,4 @@  sources = files('main.c',
 		'test_bbdev_perf.c',
 		'test_bbdev_vector.c')
 allow_experimental_apis = true
-deps = ['bbdev', 'bus_vdev']
+deps += ['bbdev', 'bus_vdev']
diff --git a/app/test-crypto-perf/meson.build b/app/test-crypto-perf/meson.build
index eacd7a0..d735b18 100644
--- a/app/test-crypto-perf/meson.build
+++ b/app/test-crypto-perf/meson.build
@@ -12,4 +12,4 @@  sources = files('cperf_ops.c',
 		'cperf_test_vectors.c',
 		'cperf_test_verify.c',
 		'main.c')
-deps = ['cryptodev']
+deps += ['cryptodev']
diff --git a/app/test-pmd/meson.build b/app/test-pmd/meson.build
index a0b3be0..c24f75f 100644
--- a/app/test-pmd/meson.build
+++ b/app/test-pmd/meson.build
@@ -22,7 +22,7 @@  sources = files('cmdline.c',
 	'testpmd.c',
 	'txonly.c')
 
-deps = ['ethdev', 'gro', 'gso', 'cmdline', 'metrics', 'meter', 'bus_pci']
+deps += ['ethdev', 'gro', 'gso', 'cmdline', 'metrics', 'meter', 'bus_pci']
 if dpdk_conf.has('RTE_LIBRTE_PDUMP')
 	deps += 'pdump'
 endif
diff --git a/config/meson.build b/config/meson.build
index 6f9228c..275f00b 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -21,6 +21,9 @@  toolchain = cc.get_id()
 dpdk_conf.set_quoted('RTE_TOOLCHAIN', toolchain)
 dpdk_conf.set('RTE_TOOLCHAIN_' + toolchain.to_upper(), 1)
 
+add_project_link_arguments('-Wl,--no-as-needed', language: 'c')
+dpdk_extra_ldflags += '-Wl,--no-as-needed'
+
 # use pthreads
 add_project_link_arguments('-pthread', language: 'c')
 dpdk_extra_ldflags += '-pthread'
diff --git a/lib/meson.build b/lib/meson.build
index b5612ad..ef3f3a6 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -127,6 +127,7 @@  foreach l:libraries
 					dependencies: shared_deps)
 
 			dpdk_libraries = [shared_lib] + dpdk_libraries
+			dpdk_static_libraries = [static_lib] + dpdk_static_libraries
 		endif # sources.length() > 0
 
 		set_variable('shared_' + libname, shared_dep)
diff --git a/meson.build b/meson.build
index c9af335..f3bddb2 100644
--- a/meson.build
+++ b/meson.build
@@ -12,6 +12,7 @@  project('DPDK', 'C',
 cc = meson.get_compiler('c')
 dpdk_conf = configuration_data()
 dpdk_libraries = []
+dpdk_static_libraries = []
 dpdk_drivers = []
 dpdk_extra_ldflags = []