mirror of
https://github.com/status-im/c-kzg-4844.git
synced 2025-01-18 14:12:44 +00:00
Set /std:c11 ccflag for Windows in Rust bindings (#354)
This commit is contained in:
parent
666a9de002
commit
d35b0f3854
@ -43,8 +43,3 @@ glob = "0.3"
|
||||
[[bench]]
|
||||
name = "kzg_benches"
|
||||
harness = false
|
||||
|
||||
# The benchmarks crash on Windows with Rust 1.70. This is a band-aid fix for
|
||||
# that. Refer to #318 for more details. This should be removed if fixed.
|
||||
[profile.bench]
|
||||
opt-level = 0
|
||||
|
@ -30,7 +30,15 @@ fn main() {
|
||||
let mut cc = cc::Build::new();
|
||||
|
||||
#[cfg(windows)]
|
||||
cc.flag("-D_CRT_SECURE_NO_WARNINGS");
|
||||
{
|
||||
cc.flag("-D_CRT_SECURE_NO_WARNINGS");
|
||||
|
||||
// In blst, if __STDC_VERSION__ isn't defined as c99 or greater, it will typedef a bool to
|
||||
// an int. There is a bug in bindgen associated with this. It assumes that a bool in C is
|
||||
// the same size as a bool in Rust. This is the root cause of the issues on Windows. If/when
|
||||
// this is fixed in bindgen, it should be safe to remove this compiler flag.
|
||||
cc.flag("/std:c11");
|
||||
}
|
||||
|
||||
cc.include(blst_headers_dir.clone());
|
||||
cc.warnings(false);
|
||||
|
Loading…
x
Reference in New Issue
Block a user