forked from aya-rs/aya
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
xtask: ensure libbpf submodule is initialized
Libbpf is used by xtasks, in the command, ensure that the submodules are initialized. This eases the user-experience so that users don't need to think about the submodule, while retaining all the benefits of using a submodule vs forcing the user to manually check out libbpf and stick it in some pre-defined place. We use the symbol pointing to libbpf in xtask in the build script to avoid repeating this constant. Also, we install git in the vm so that we can init the submodule when we build in the vm.
- Loading branch information
Showing
9 changed files
with
87 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
use anyhow::{anyhow, Context as _, Result}; | ||
use std::process::Command; | ||
|
||
pub fn exec(cmd: &mut Command) -> Result<()> { | ||
let status = cmd | ||
.status() | ||
.with_context(|| format!("failed to run {cmd:?}"))?; | ||
match status.code() { | ||
Some(code) => match code { | ||
0 => Ok(()), | ||
code => Err(anyhow!("{cmd:?} exited with code {code}")), | ||
}, | ||
None => Err(anyhow!("{cmd:?} terminated by signal")), | ||
} | ||
} | ||
|
||
pub const LIBBPF_DIR: &str = "libbpf"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters