Skip to contentSkip to conversation

build: provide suitable error for "both" libraries option

PATCH In review Bruce Richardson 4 participants 5 messages Jan 11, 2021 – Jan 20, 2021 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

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
index 3ddcc3539..05e9cede5 100644
@@ -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

Reviewed-by on v1 1/1
#1 lore raw
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.

---
config/meson.build | 9 +++++++++

1 file changed, 9 insertions(+)
config/meson.build +0 -0
index 3ddcc3539..05e9cede5 100644
@@ -308,3 +308,12 @@ if get_option('b_lto')
 		add_project_link_arguments('-Wno-lto-type-mismatch', language: 'c')
 	endif

endif

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

#2 lore raw
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.

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..05e9cede5 100644 --- a/config/meson.build +++ b/config/meson.build @@ -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''')

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

#3 lore raw
In reply to Andrew Boyer

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.

---

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

Applied with above fixup, thanks

Reviewed-by on v1 1/1
#4 lore raw
In reply to Bruce Richardson

<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.

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..05e9cede5 100644

config/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