DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/octeontx: meson build fix if octeontx drivers are disabled
@ 2020-02-17  7:47 agupta3
  2020-02-17  9:54 ` David Marchand
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: agupta3 @ 2020-02-17  7:47 UTC (permalink / raw)
  To: Harman Kalra; +Cc: dev, Amit Gupta

From: Amit Gupta <agupta3@marvell.com>

Add a condition to check if octeontx drivers are disabled.
octeontx drivers are built only if dependent drivers i.e.
ethdev, mempool and common/octeontx are enabled.

BugZilla ID # BUG 387

Signed-off-by: Amit Gupta <agupta3@marvell.com>
---
 drivers/net/octeontx/base/meson.build | 32 ++++++++++++++++++++++++--------
 1 file changed, 24 insertions(+), 8 deletions(-)

diff --git a/drivers/net/octeontx/base/meson.build b/drivers/net/octeontx/base/meson.build
index a06a2c8..50e7972 100644
--- a/drivers/net/octeontx/base/meson.build
+++ b/drivers/net/octeontx/base/meson.build
@@ -9,17 +9,33 @@ sources = [
 
 depends = ['ethdev', 'mempool_octeontx']
 static_objs = []
-foreach d: depends
-	static_objs += [get_variable('static_rte_' + d)]
+
+disabled_drivers = get_option('disable_drivers').split(',')
+
+build = true
+foreach disable_path: disabled_drivers
+        if (('net/octeontx' == disable_path) or
+	   ('event/octeontx' == disable_path) or
+	   ('common/octeontx' == disable_path) or
+	   ('mempool/octeontx' == disable_path))
+                build = false
+        endif
 endforeach
 
 c_args = cflags
 if allow_experimental_apis
-	c_args += '-DALLOW_EXPERIMENTAL_API'
+        c_args += '-DALLOW_EXPERIMENTAL_API'
 endif
-base_lib = static_library('octeontx_base', sources,
-	c_args: c_args,
-	dependencies: static_objs,
-)
 
-base_objs = base_lib.extract_all_objects()
+if build
+        foreach d: depends
+                static_objs += [get_variable('static_rte_' + d)]
+        endforeach
+
+        base_lib = static_library('octeontx_base', sources,
+                c_args: c_args,
+                dependencies: static_objs,
+        )
+
+        base_objs = base_lib.extract_all_objects()
+endif
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2020-04-06 10:04 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-17  7:47 [dpdk-dev] [PATCH] net/octeontx: meson build fix if octeontx drivers are disabled agupta3
2020-02-17  9:54 ` David Marchand
2020-02-19  4:34   ` [dpdk-dev] [EXT] " Amit Gupta
2020-02-17 10:48 ` [dpdk-dev] " Bruce Richardson
2020-02-19  4:32   ` [dpdk-dev] [EXT] " Amit Gupta
2020-03-02  6:31 ` [dpdk-dev] [PATCH v2 1/1] net/octeontx: fix meson build for disabled octeontx drivers agupta3
2020-03-02 10:53   ` Bruce Richardson
2020-03-03  3:10     ` [dpdk-dev] [EXT] " Amit Gupta
2020-03-03 11:17       ` Bruce Richardson
2020-03-04  5:47         ` Amit Gupta
2020-03-04  5:47   ` [dpdk-dev] [PATCH v3 " agupta3
2020-03-04 13:49     ` Bruce Richardson
2020-04-05 11:57       ` Jerin Jacob
2020-04-06 10:03     ` Harman Kalra

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