import upstream maccel baseline
Tests / test_core_function (push) Failing after 12s

This commit is contained in:
2026-03-24 12:10:31 +00:00
parent 6e948d7b39
commit 5f1254d11a
108 changed files with 18930 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
use std::{
env::{self, consts::ARCH},
path::PathBuf,
};
fn main() {
let out = PathBuf::from(
env::var("OUT_DIR").expect("Expected OUT_DIR to be defined in the environment"),
);
let fixedpt_bits = match ARCH {
"x86" => "32",
#[cfg(feature = "long_bit_32")]
"x86_64" => "32",
#[cfg(not(feature = "long_bit_32"))]
"x86_64" => "64",
a => panic!("unsupported/untested architecture: {a}"),
};
let mut compiler = cc::Build::new();
compiler
.file("src/libmaccel.c")
.define("FIXEDPT_BITS", fixedpt_bits);
if cfg!(feature = "dbg") {
compiler.define("DEBUG", "1");
compiler.debug(true);
}
compiler.compile("maccel");
println!("cargo:rust-link-search=static={}", out.display());
const DRIVER_DIR: &str = "../../driver";
println!("cargo:rerun-if-changed={DRIVER_DIR}");
println!("cargo:rerun-if-changed=src/libmaccel.c");
}