luajit2-sys: Compile in parallel
All checks were successful
build/linux Build for the target platform: linux
lint/clippy Checking for common mistakes and opportunities for code improvement
build/msvc Build for the target platform: msvc
All checks were successful
build/linux Build for the target platform: linux
lint/clippy Checking for common mistakes and opportunities for code improvement
build/msvc Build for the target platform: msvc
This commit is contained in:
parent
f47dd4ecb8
commit
71051a384b
2 changed files with 8 additions and 7 deletions
|
@ -19,7 +19,7 @@ bincode = "2.0.0"
|
|||
bindgen = "0.70.1"
|
||||
bitflags = "2.5.0"
|
||||
byteorder = "1.4.3"
|
||||
cc = "1.2.27"
|
||||
cc = { version = "1.2.27", features = ["parallel"] }
|
||||
clap = { version = "4.0.15", features = ["color", "derive", "std", "cargo", "string", "unicode"] }
|
||||
cli-table = { version = "0.5.0", default-features = false, features = ["derive"] }
|
||||
color-eyre = { path = "lib/color-eyre" }
|
||||
|
|
|
@ -82,6 +82,11 @@ const LUAJIT_SRC: [&str; 65] = [
|
|||
|
||||
fn build_gcc(src_dir: &str) {
|
||||
let mut buildcmd = Command::new("make");
|
||||
if let Ok(flags) = env::var("CARGO_MAKEFLAGS") {
|
||||
buildcmd.env("MAKEFLAGS", flags);
|
||||
} else {
|
||||
buildcmd.arg("-j8");
|
||||
}
|
||||
buildcmd.current_dir(src_dir);
|
||||
buildcmd.stderr(Stdio::inherit());
|
||||
buildcmd.arg("--no-silent");
|
||||
|
@ -102,14 +107,10 @@ fn build_gcc(src_dir: &str) {
|
|||
|
||||
let mut child = buildcmd.spawn().expect("failed to run make");
|
||||
|
||||
if !child
|
||||
child
|
||||
.wait()
|
||||
.map(|status| status.success())
|
||||
.map_err(|_| false)
|
||||
.unwrap_or(false)
|
||||
{
|
||||
panic!("Failed to build luajit");
|
||||
}
|
||||
.expect("Failed to build LuaJIT");
|
||||
}
|
||||
|
||||
fn build_msvc(src_dir: &str, out_dir: &str) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue