gpio: Skip musl builds

Disable builds for musl, where libgpiod build fails on
rust-vmm-container due to missing tools and headers.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
This commit is contained in:
Viresh Kumar 2021-12-23 13:15:11 +05:30
parent a9678adfb9
commit 131464787d
2 changed files with 12 additions and 0 deletions

View File

@ -24,6 +24,7 @@ virtio-queue = "0.2"
vm-memory = "0.7"
vmm-sys-util = "=0.9.0"
[target.'cfg(target_env = "gnu")'.dependencies]
libgpiod = { git = "https://github.com/vireshk/libgpiod" }
[dev-dependencies]

View File

@ -5,10 +5,21 @@
//
// SPDX-License-Identifier: Apache-2.0
#[cfg(target_env = "gnu")]
mod backend;
#[cfg(target_env = "gnu")]
mod gpio;
#[cfg(target_env = "gnu")]
mod vhu_gpio;
#[cfg(target_env = "gnu")]
fn main() -> backend::Result<()> {
backend::gpio_init()
}
// Rust vmm container (https://github.com/rust-vmm/rust-vmm-container) doesn't
// have tools to do a musl build at the moment, and adding that support is
// tricky as well to the container. Skip musl builds until the time pre-built
// libgpiod library is available for musl.
#[cfg(target_env = "musl")]
fn main() {}