-
Notifications
You must be signed in to change notification settings - Fork 74
/
build.rs
36 lines (29 loc) · 950 Bytes
/
build.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
fn main() {
println!("cargo:rerun-if-changed=build.rs");
#[cfg(feature = "ispc")]
{
if std::env::var("CARGO_FEATURE_ISPC").is_ok() {
let mut cfg = ispc::Config::new();
if cfg!(windows) {
cfg.debug(false);
}
let ispc_files = vec!["volta/options.ispc"];
for s in &ispc_files[..] {
cfg.file(*s);
}
cfg.target_isas(vec![
ispc::opt::TargetISA::SSE2i32x4,
ispc::opt::TargetISA::SSE4i32x4,
ispc::opt::TargetISA::AVX1i32x8,
ispc::opt::TargetISA::AVX2i32x8,
ispc::opt::TargetISA::AVX512KNLi32x16,
]);
#[cfg(feature = "ispc_libm")]
{
// Use the system's libm
cfg.math_lib(ispc::opt::MathLib::System);
}
cfg.compile("options");
}
}
}