From: Thomas Monjalon <thomas@monjalon.net>
To: dev@dpdk.org
Cc: bruce.richardson@intel.com,
John McNamara <john.mcnamara@intel.com>,
Marko Kovacevic <marko.kovacevic@intel.com>
Subject: [dpdk-dev] [PATCH v2 3/4] build: allow hiding dependencies from pkg-config
Date: Mon, 27 Jan 2020 16:44:01 +0100 [thread overview]
Message-ID: <20200127154402.4008069-4-thomas@monjalon.net> (raw)
In-Reply-To: <20200127154402.4008069-1-thomas@monjalon.net>
If a dependency is required for a driver build,
but should not be exposed to the application (via pkg-config),
it can be declared in the array hidden_deps.
The hidden_deps are used as internal dependencies,
when building the shared library and the first stage of static library.
The final static library does not include the hidden_deps
because this library object is used to generate the .pc file.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
doc/guides/contributing/coding_style.rst | 6 ++++++
drivers/meson.build | 9 ++++++---
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/doc/guides/contributing/coding_style.rst b/doc/guides/contributing/coding_style.rst
index 841ef6d5c8..c96457273f 100644
--- a/doc/guides/contributing/coding_style.rst
+++ b/doc/guides/contributing/coding_style.rst
@@ -975,6 +975,12 @@ deps
ext_deps
As above.
+hidden_deps
+ **Default Value = []**.
+ Used to specify external dependencies, same as ``ext_deps``, except
+ the libraries won't be exposed as requirements of the static driver,
+ in the section ``Requires.private`` of the generated ``.pc`` file.
+
includes
**Default Value = <driver directory>** Some drivers include a base
directory for additional source files and headers, so we have this
diff --git a/drivers/meson.build b/drivers/meson.build
index 29708cc2bb..759263c309 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -56,6 +56,7 @@ foreach class:dpdk_driver_classes
# too, so that it can be reflected in the pkgconfig output for
# static builds.
ext_deps = []
+ hidden_deps = []
pkgconfig_extra_libs = []
# pull in driver directory which should assign to each of the above
@@ -71,8 +72,9 @@ foreach class:dpdk_driver_classes
endforeach
if build
# get dependency objs from strings
- shared_deps = ext_deps
- static_deps = ext_deps
+ shared_deps = ext_deps + hidden_deps
+ static_deps = ext_deps + hidden_deps
+ static_pub_deps = ext_deps
foreach d:deps
if not is_variable('shared_rte_' + d)
build = false
@@ -82,6 +84,7 @@ foreach class:dpdk_driver_classes
else
shared_deps += [get_variable('shared_rte_' + d)]
static_deps += [get_variable('static_rte_' + d)]
+ static_pub_deps += [get_variable('static_rte_' + d)]
endif
endforeach
endif
@@ -144,7 +147,7 @@ foreach class:dpdk_driver_classes
sources,
objects: objs,
include_directories: includes,
- dependencies: static_deps,
+ dependencies: static_pub_deps, # skip hidden_deps
c_args: cflags,
install: true)
--
2.24.1
next prev parent reply other threads:[~2020-01-27 15:44 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-16 7:16 [dpdk-dev] [PATCH 0/3] add static ibverbs in meson Thomas Monjalon
2020-01-16 7:16 ` [dpdk-dev] [PATCH 1/3] buildtools: rework static pkg-config script Thomas Monjalon
2020-01-16 7:16 ` [dpdk-dev] [PATCH 2/3] build: allow to hide dependencies from pkg-config Thomas Monjalon
2020-01-17 17:34 ` Bruce Richardson
2020-01-16 7:16 ` [dpdk-dev] [PATCH 3/3] net/mlx: support static ibverbs linkage with meson Thomas Monjalon
2020-01-27 15:43 ` [dpdk-dev] [PATCH v2 0/4] add static ibverbs in meson Thomas Monjalon
2020-01-27 15:43 ` [dpdk-dev] [PATCH v2 1/4] net/mlx: add static ibverbs linkage with meson Thomas Monjalon
2020-01-27 15:44 ` [dpdk-dev] [PATCH v2 2/4] buildtools: get static mlx dependencies for meson Thomas Monjalon
2020-01-29 15:37 ` Bruce Richardson
2020-01-29 17:48 ` Thomas Monjalon
2020-01-29 17:50 ` Bruce Richardson
2020-01-29 18:49 ` Thomas Monjalon
2020-01-29 17:48 ` Bruce Richardson
2020-01-27 15:44 ` Thomas Monjalon [this message]
2020-01-27 15:44 ` [dpdk-dev] [PATCH v2 4/4] net/mlx: workaround static linkage with meson Thomas Monjalon
2020-02-04 11:48 ` [dpdk-dev] [PATCH v2 0/4] add static ibverbs in meson Bruce Richardson
2020-02-04 14:27 ` Thomas Monjalon
2020-02-04 14:33 ` Bruce Richardson
2020-02-04 15:14 ` Thomas Monjalon
2020-02-04 15:20 ` Bruce Richardson
2020-02-11 1:19 ` [dpdk-dev] [PATCH v3 0/5] mlx ibverbs linking " Thomas Monjalon
2020-02-11 1:19 ` [dpdk-dev] [PATCH v3 1/5] net/mlx: add static ibverbs linkage with meson Thomas Monjalon
2020-02-11 1:19 ` [dpdk-dev] [PATCH v3 2/5] buildtools: get static mlx dependencies for meson Thomas Monjalon
2020-02-11 1:19 ` [dpdk-dev] [PATCH v3 3/5] net/mlx: workaround static linkage with meson Thomas Monjalon
2020-02-11 11:29 ` Bruce Richardson
2020-02-11 11:36 ` Thomas Monjalon
2020-02-11 11:43 ` Bruce Richardson
2020-02-11 1:19 ` [dpdk-dev] [PATCH v3 4/5] net/mlx: rename meson variable for dlopen option Thomas Monjalon
2020-02-11 1:19 ` [dpdk-dev] [PATCH v3 5/5] net/mlx: fix overlinking with meson and glue dlopen Thomas Monjalon
2020-02-11 11:32 ` Bruce Richardson
2020-02-11 11:34 ` Thomas Monjalon
2020-02-11 11:33 ` [dpdk-dev] [PATCH v3 0/5] mlx ibverbs linking in meson Bruce Richardson
2020-02-12 1:59 ` [dpdk-dev] [PATCH v4 0/6] " Thomas Monjalon
2020-02-12 1:59 ` [dpdk-dev] [PATCH v4 1/6] drivers: cleanup meson build variable Thomas Monjalon
2020-02-12 9:26 ` Xu, Rosen
2020-02-12 9:32 ` Thomas Monjalon
2020-02-12 15:04 ` [dpdk-dev] [dpdklab] " Jeremy Plsek
2020-02-12 15:18 ` Jeremy Plsek
2020-02-12 16:30 ` Thomas Monjalon
2020-02-12 16:36 ` Jeremy Plsek
2020-02-12 16:42 ` Thomas Monjalon
2020-02-12 16:46 ` Jeremy Plsek
2020-02-12 17:38 ` Thomas Monjalon
2020-02-12 18:03 ` Jeremy Plsek
2020-02-12 1:59 ` [dpdk-dev] [PATCH v4 2/6] net/mlx: add static ibverbs linkage with meson Thomas Monjalon
2020-02-12 1:59 ` [dpdk-dev] [PATCH v4 3/6] buildtools: get static mlx dependencies for meson Thomas Monjalon
2020-02-12 1:59 ` [dpdk-dev] [PATCH v4 4/6] net/mlx: workaround static linkage with meson Thomas Monjalon
2020-02-12 1:59 ` [dpdk-dev] [PATCH v4 5/6] net/mlx: rename meson variable for dlopen option Thomas Monjalon
2020-02-12 1:59 ` [dpdk-dev] [PATCH v4 6/6] net/mlx: fix overlinking with meson and glue dlopen Thomas Monjalon
2020-02-12 2:08 ` [dpdk-dev] [PATCH v4 0/6] mlx ibverbs linking in meson Thomas Monjalon
2020-02-12 22:07 ` [dpdk-dev] [PATCH v5 " Thomas Monjalon
2020-02-12 22:07 ` [dpdk-dev] [PATCH v5 1/6] drivers: cleanup meson build variable Thomas Monjalon
2020-02-13 0:25 ` Xu, Rosen
2020-02-12 22:07 ` [dpdk-dev] [PATCH v5 2/6] net/mlx: add static ibverbs linkage with meson Thomas Monjalon
2020-02-12 22:07 ` [dpdk-dev] [PATCH v5 3/6] buildtools: get static mlx dependencies for meson Thomas Monjalon
2020-02-12 22:07 ` [dpdk-dev] [PATCH v5 4/6] net/mlx: workaround static linkage with meson Thomas Monjalon
2020-02-12 22:07 ` [dpdk-dev] [PATCH v5 5/6] net/mlx: rename meson variable for dlopen option Thomas Monjalon
2020-02-12 22:07 ` [dpdk-dev] [PATCH v5 6/6] net/mlx: fix overlinking with meson and glue dlopen Thomas Monjalon
2020-02-13 13:57 ` [dpdk-dev] [PATCH v5 0/6] mlx ibverbs linking in meson Raslan Darawsheh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200127154402.4008069-4-thomas@monjalon.net \
--to=thomas@monjalon.net \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=john.mcnamara@intel.com \
--cc=marko.kovacevic@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).