mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-13 19:31:02 +00:00
Invert use_target_has_atomic cfg
This way, a build system that does not want to run Cargo build scripts can build serde without any cfgs defined, and get the most modern feature set.
This commit is contained in:
+2
-3
@@ -95,9 +95,8 @@ fn main() {
|
||||
// Whitelist of archs that support std::sync::atomic module. Ideally we
|
||||
// would use #[cfg(target_has_atomic = "...")] but it is not stable yet.
|
||||
// Instead this is based on rustc's compiler/rustc_target/src/spec/*.rs.
|
||||
if minor >= 60 {
|
||||
println!("cargo:rustc-cfg=use_target_has_atomic");
|
||||
} else {
|
||||
if minor < 60 {
|
||||
println!("cargo:rustc-cfg=no_target_has_atomic");
|
||||
let has_atomic64 = target.starts_with("x86_64")
|
||||
|| target.starts_with("i686")
|
||||
|| target.starts_with("aarch64")
|
||||
|
||||
Reference in New Issue
Block a user