Skip to content

Commit 60a1ffe

Browse files
committed
try to fix sanitizers; first step
1 parent 0f7810e commit 60a1ffe

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Modules/cpython-sys/build.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ fn generate_c_api_bindings(srcdir: &Path, builddir: Option<&str>, out_path: &Pat
6363
// Suppress all clang warnings (deprecation warnings, etc.)
6464
builder = builder.clang_arg("-w");
6565

66+
// Use C11 with GNU extensions so that <stdatomic.h> is available,
67+
// required by the mimalloc headers.
68+
builder = builder.clang_arg("-std=gnu11");
69+
6670
// Tell clang the correct target triple for cross-compilation when we have
6771
// an LLVM-specific triple. Otherwise let bindgen translate Cargo's TARGET
6872
// itself (e.g. aarch64-apple-ios-sim -> arm64-apple-ios-simulator).

0 commit comments

Comments
 (0)