Skip to content

Commit bc026f5

Browse files
committed
add safety comment
1 parent 712caea commit bc026f5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Modules/cpython-sys/build.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ fn prefer_newest_libclang() {
7070
}
7171
if let Some((ver, lib_dir)) = best {
7272
eprintln!("cpython-sys: using libclang from llvm-{ver}");
73-
env::set_var("LIBCLANG_PATH", &lib_dir);
73+
// SAFETY: build scripts are single-threaded.
74+
unsafe { env::set_var("LIBCLANG_PATH", &lib_dir) };
7475
}
7576
}
7677

0 commit comments

Comments
 (0)