build: fix essential drivers in disable list
authorBruce Richardson <bruce.richardson@intel.com>
Wed, 18 Aug 2021 13:42:40 +0000 (14:42 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 15 Sep 2021 09:00:15 +0000 (11:00 +0200)
commit0e837e584e36ea546bc374e9add3573f5615e849
treefc9f1423f4b93430e61a2eabd26063f4b886220e
parent1c91ed5cdde164ca319c2c3b0ba5b4643db8e614
build: fix essential drivers in disable list

The PCI and vdev bus drivers cannot be disabled for DPDK builds and
special logic is put in place to not skip them when they are specified
in the disable list. This logic is broken though, as the inclusion of
the driver-specific meson.build file is only included in the "else" leg
of the condition check. This means that when they are specified as
disabled the PCI and vdev buses are not disabled, but neither are their
source files compiled.

Fix this by moving the "subdir()" call into the next "if build" block,
ensuring that if not disabled the sources are always included. To take
account of the fact that the subdir call could itself disable the
driver, we add a break call into the following loop to ensure we quickly
fall through to the following block which stops processing appropriately
if the driver is disabled.

Fixes: 2e33309ebe03 ("config: enable/disable drivers in Arm builds")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
drivers/meson.build