From: Mohammed Hawari <mohammed@hawari.fr>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 1/1] build: allow disabling libs
Date: Fri, 18 Sep 2020 10:49:23 +0200 [thread overview]
Message-ID: <20200918084924.31784-2-mohammed@hawari.fr> (raw)
In-Reply-To: <20200918084924.31784-1-mohammed@hawari.fr>
Similarly to the disable_drivers option, the disable_libs option is
introduced. This allows to selectively disable the build of elements
in libs to speed-up the build process.
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
---
app/meson.build | 12 +++++++++++-
lib/meson.build | 7 +++++++
meson.build | 9 +++++++++
meson_options.txt | 2 ++
4 files changed, 29 insertions(+), 1 deletion(-)
diff --git a/app/meson.build b/app/meson.build
index eb74f215a..93affefa3 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -42,7 +42,17 @@ foreach app:apps
subdir(name)
- if build
+ foreach d:deps
+ if dpdk_libs_disabled.contains(d)
+ build = false
+ reason = 'missing dependency, "@0@" '.format (d)
+ endif
+ endforeach
+
+ if not build
+ dpdk_apps_disabled += name
+ set_variable(name.underscorify() + '_disable_reason', reason)
+ else
dep_objs = []
foreach d:deps
dep_objs += get_variable(get_option('default_library')
diff --git a/lib/meson.build b/lib/meson.build
index d8b358e5f..c8507fda1 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -45,6 +45,8 @@ if is_windows
] # only supported libraries for windows
endif
+disabled_libs = get_option('disable_libs').split(',')
+
default_cflags = machine_args
default_cflags += ['-DALLOW_EXPERIMENTAL_API']
default_cflags += ['-DALLOW_INTERNAL_API']
@@ -79,6 +81,11 @@ foreach l:libraries
dir_name = 'librte_' + l
subdir(dir_name)
+ if disabled_libs.contains(l)
+ build = false
+ reason = 'Explicitly disabled via build config'
+ endif
+
if build
shared_deps = ext_deps
static_deps = ext_deps
diff --git a/meson.build b/meson.build
index 61d9a4f5f..cf04f0e0e 100644
--- a/meson.build
+++ b/meson.build
@@ -21,6 +21,7 @@ dpdk_drivers = []
dpdk_extra_ldflags = []
dpdk_libs_disabled = []
dpdk_drvs_disabled = []
+dpdk_apps_disabled = []
abi_version_file = files('ABI_VERSION')
if host_machine.cpu_family().startswith('x86')
@@ -106,6 +107,14 @@ foreach class:dpdk_driver_classes
endforeach
message(output_message + '\n')
+output_message = '\n===============\nApplications Disabled\n===============\n'
+foreach app:dpdk_apps_disabled
+ reason = get_variable(app.underscorify() + '_disable_reason')
+ output_message += app + ':\t' + reason + '\n\t'
+endforeach
+
+message(output_message + '\n')
+
output_message = '\n=================\nContent Skipped\n=================\n'
output_message += '\nlibs:\n\t'
foreach lib:dpdk_libs_disabled
diff --git a/meson_options.txt b/meson_options.txt
index 9bf18ab6b..d1aa46b8d 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -4,6 +4,8 @@ option('armv8_crypto_dir', type: 'string', value: '',
description: 'path to the armv8_crypto library installation directory')
option('disable_drivers', type: 'string', value: '',
description: 'Comma-separated list of drivers to explicitly disable.')
+option('disable_libs', type: 'string', value: '',
+ description: 'Comma-separated list of libs to explicitly disable.')
option('drivers_install_subdir', type: 'string', value: 'dpdk/pmds-<VERSION>',
description: 'Subdirectory of libdir where to install PMDs. Defaults to using a versioned subdirectory.')
option('enable_docs', type: 'boolean', value: false,
--
2.28.0
next prev parent reply other threads:[~2020-09-18 8:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-18 8:49 [dpdk-dev] [PATCH 0/1] " Mohammed Hawari
2020-09-18 8:49 ` Mohammed Hawari [this message]
2020-09-18 11:43 ` [dpdk-dev] [PATCH 1/1] " Bruce Richardson
2020-09-18 12:54 ` Mohammed Hawari
2020-09-18 13:57 ` Bruce Richardson
2023-06-14 19:09 ` Stephen Hemminger
2023-06-15 8:42 ` Bruce Richardson
2023-06-15 15:43 ` David Marchand
2023-06-15 16:07 ` Bruce Richardson
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=20200918084924.31784-2-mohammed@hawari.fr \
--to=mohammed@hawari.fr \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
/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).