aboutsummaryrefslogtreecommitdiff
path: root/embassy-executor/build.rs
diff options
context:
space:
mode:
authorDániel Buga <[email protected]>2024-11-06 10:44:01 +0100
committerDániel Buga <[email protected]>2024-11-06 10:48:59 +0100
commit1e850ae79149e737c1ba39a383596eabcb0bb940 (patch)
treea9b9c47c01b444f370ed8194653f3ef45c72cbc8 /embassy-executor/build.rs
parente4f611b97c886582dc99b03e93e8f8411f61c45a (diff)
Detect and allow older nightlies
Diffstat (limited to 'embassy-executor/build.rs')
-rw-r--r--embassy-executor/build.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/embassy-executor/build.rs b/embassy-executor/build.rs
index 8a41d7503..c4c86e1e2 100644
--- a/embassy-executor/build.rs
+++ b/embassy-executor/build.rs
@@ -96,4 +96,15 @@ fn main() {
96 96
97 let mut rustc_cfgs = common::CfgSet::new(); 97 let mut rustc_cfgs = common::CfgSet::new();
98 common::set_target_cfgs(&mut rustc_cfgs); 98 common::set_target_cfgs(&mut rustc_cfgs);
99
100 // Waker API changed on 2024-09-06
101 rustc_cfgs.declare("at_least_2024_09_06");
102 let Some(compiler) = common::compiler_info() else {
103 return;
104 };
105 if compiler.channel == rustc_version::Channel::Nightly
106 && compiler.commit_date.map(|d| d >= "2024-09-06").unwrap_or(false)
107 {
108 rustc_cfgs.enable("at_least_2024_09_06");
109 }
99} 110}