Skip to content

Commit

Permalink
Provide the opt-out gate without build.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
pinkforest committed Aug 20, 2023
1 parent 10a0210 commit 81e79c1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 24 deletions.
2 changes: 1 addition & 1 deletion precompiled/serde_derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ deserialize_in_place = []
[lib]
proc-macro = true

[target.'cfg(serde_derive_build = "source")'.dependencies]
[target.'cfg(any(serde_derive_build = "source", all(target_arch = "x86_64", target_os = "linux", target_env = "gnu")))'.dependencies]
proc-macro2 = "1"
quote = "1"
syn = "2.0.28"
Expand Down
21 changes: 0 additions & 21 deletions precompiled/serde_derive/build.rs

This file was deleted.

12 changes: 10 additions & 2 deletions precompiled/serde_derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,16 @@

#![doc(html_root_url = "https://docs.rs/serde_derive/1.0.183")]

#[cfg(serde_derive_build = "source")]
#[cfg(any(
serde_derive_build = "source",
not(all(target_arch = "x86_64", target_os = "linux", target_env = "gnu"))
))]
include!("lib_from_source.rs");

#[cfg(not(serde_derive_build = "source"))]
#[cfg(all(
not(serde_derive_build = "source"),
target_arch = "x86_64",
target_os = "linux",
target_env = "gnu"
))]
include!("lib_precompiled.rs");

0 comments on commit 81e79c1

Please sign in to comment.