build: provide suitable error for "both" libraries option
PATCH 1/1 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.
--- config/meson.build | 9 +++++++++ 1 file changed, 9 insertions(+)
config/meson.build +9 -0
@@ -308,3 +308,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.27.0
Quoted 24 lines · Bruce Richardson
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.Signed-off-by Bruce Richardson <[email protected]>---
config/meson.build | 9 +++++++++1 file changed, 9 insertions(+)config/meson.build +0
-0@@ -308,3 +308,12 @@ if get_option('b_lto') add_project_link_arguments('-Wno-lto-type-mismatch', language: 'c') endifendif
config/meson.build if get_option('b_lto') · line 318
Quoted 8 lines
config/meson.build +8
-0+ +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''')
Should there be a period after ‘examples’?
Quoted 4 lines
+endif
--
2.27.0
Quoted 15 lines · Andrew Boyer
Quoted 15 lines
On Jan 11, 2021, at 8:55 AM, Bruce Richardson
<[email protected]> wrote: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.Signed-off-by Bruce Richardson <[email protected]> ---config/meson.build | 9 +++++++++ 1 file changed, 9 insertions(+)
Quoted 12 lines
Quoted 9 lines
config/meson.build index renamed from config/meson.build +0
-0
3ddcc3539..05e9cede5100644 --- a/config/meson.build +++ b/config/meson.build @@ -308,3 +308,12 @@ ifget_option('b_lto')add_project_link_arguments('-Wno-lto-type-mismatch', language: 'c')
endif endif + +ifget_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''')Should there be a period after ‘examples’?
Yes, to have it a valid English sentence. If there are no other comments to fix I'll not do a v2 for it alone, though - committers, feel free to add one on apply.
/Bruce
11/01/2021 17:19, Andrew Boyer:
Quoted 21 lines
Quoted 11 lines · Bruce Richardson
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.Signed-off-by Bruce Richardson <[email protected]>---
config/meson.build if get_option('b_lto') · line 318
Quoted 7 lines
config/meson.build +7
-0+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''')Should there be a period after ‘examples’?
Quoted 1 line
Reviewed-by Andrew Boyer <[email protected]>
Applied with above fixup, thanks
<snip>
Quoted 9 lines
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.Signed-off-by Bruce Richardson <[email protected]>
Looks good, thanks Bruce
Quoted 24 lines
--- config/meson.build | 9 +++++++++ 1 file changed, 9 insertions(+)config/meson.build index renamed from config/meson.build +0
-0
3ddcc3539..05e9cede5100644config/meson.build +9
-1@@ -308,3 +308,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.27.0