chiark
/
gitweb
/
~ian
/
hippotat.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c861c75
)
Break out package_cfg construction
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Fri, 11 Oct 2024 09:53:35 +0000
(10:53 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Fri, 11 Oct 2024 09:53:35 +0000
(10:53 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
build.rs
patch
|
blob
|
history
diff --git
a/build.rs
b/build.rs
index 2643bbfc061bc51436e8c7253cd4c4845b96afb3..299a2862384f89ec47b9d0156680fc58abe5537b 100644
(file)
--- a/
build.rs
+++ b/
build.rs
@@
-52,8
+52,9
@@
impl Context<'_> {
for test in versions {
let cfg = test.replace('.', "_").replace(">=", "ge_");
let test: semver::VersionReq = test.parse().unwrap();
+ let cfg = format!("{package}_{cfg}");
if test.matches(&pkg) {
- println!("cargo:rustc-cfg={
package}_{
cfg}");
+ println!("cargo:rustc-cfg={cfg}");
}
}
}