From 08895f10e7729c07ccd063501acd04e77c7730f5 Mon Sep 17 00:00:00 2001 From: Bruce Richardson Date: Mon, 11 Jan 2021 13:55:59 +0000 Subject: [PATCH] build: provide suitable error for "both" libraries option Rather than having the DPDK configuration error out when linking apps and examples when "both" is select for "default_library" option, we can detect that setting earlier in the build config and provide a suitable error message to the user. Cc: stable@dpdk.org Signed-off-by: Bruce Richardson Reviewed-by: Andrew Boyer Reviewed-by: Honnappa Nagarahalli Acked-by: Thomas Monjalon --- config/meson.build | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/config/meson.build b/config/meson.build index 1e6dfe0753..9abb30c39f 100644 --- a/config/meson.build +++ b/config/meson.build @@ -330,3 +330,12 @@ if get_option('b_lto') add_project_link_arguments('-Wno-lto-type-mismatch', language: 'c') endif endif + +if get_option('default_library') == 'both' + error( ''' + Unsupported value "both" for "default_library" option. + + NOTE: DPDK always builds both shared and static libraries. Please set + "default_library" to either "static" or "shared" to select default linkage + for apps and any examples.''') +endif -- 2.20.1