diff options
| author | Dario Nieuwenhuis <[email protected]> | 2024-06-13 20:40:04 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2024-06-13 20:40:04 +0200 |
| commit | 4d9115b3fb17f441a3280dd7913e682157ca1dac (patch) | |
| tree | 2b3200de38599efcd696835a7d0a01f8e6e27365 | |
| parent | 8d79679bb27ce6eca8904e167a8762ad5fc90604 (diff) | |
Update stable to Rust 1.79.
| -rwxr-xr-x | ci-nightly.sh | 1 | ||||
| -rwxr-xr-x | ci.sh | 6 | ||||
| -rw-r--r-- | embassy-executor/build_common.rs | 4 | ||||
| -rw-r--r-- | embassy-hal-internal/build_common.rs | 4 | ||||
| -rw-r--r-- | embassy-stm32/build_common.rs | 4 | ||||
| -rw-r--r-- | embassy-sync/build_common.rs | 4 | ||||
| -rw-r--r-- | rust-toolchain.toml | 2 |
7 files changed, 23 insertions, 2 deletions
diff --git a/ci-nightly.sh b/ci-nightly.sh index 46b19c5b7..bdb364f53 100755 --- a/ci-nightly.sh +++ b/ci-nightly.sh | |||
| @@ -30,4 +30,3 @@ cargo batch \ | |||
| 30 | 30 | ||
| 31 | cargo build --release --manifest-path embassy-executor/Cargo.toml --target avr-unknown-gnu-atmega328 -Z build-std=core,alloc --features nightly,arch-avr,avr-device/atmega328p | 31 | cargo build --release --manifest-path embassy-executor/Cargo.toml --target avr-unknown-gnu-atmega328 -Z build-std=core,alloc --features nightly,arch-avr,avr-device/atmega328p |
| 32 | cargo build --release --manifest-path embassy-executor/Cargo.toml --target avr-unknown-gnu-atmega328 -Z build-std=core,alloc --features nightly,arch-avr,integrated-timers,avr-device/atmega328p | 32 | cargo build --release --manifest-path embassy-executor/Cargo.toml --target avr-unknown-gnu-atmega328 -Z build-std=core,alloc --features nightly,arch-avr,integrated-timers,avr-device/atmega328p |
| 33 | |||
| @@ -2,6 +2,12 @@ | |||
| 2 | 2 | ||
| 3 | set -eo pipefail | 3 | set -eo pipefail |
| 4 | 4 | ||
| 5 | # check-cfg is stable on rustc 1.79 but not cargo 1.79. | ||
| 6 | # however, our cargo-batch is currently based on cargo 1.80, which does support check-cfg. | ||
| 7 | # so, force build.rs scripts to emit check-cfg commands. | ||
| 8 | # when 1.80 hits stable we can make build.rs unconditionally emit check-cfg and remove all this. | ||
| 9 | export EMBASSY_FORCE_CHECK_CFG=1 | ||
| 10 | |||
| 5 | export RUSTFLAGS=-Dwarnings | 11 | export RUSTFLAGS=-Dwarnings |
| 6 | export DEFMT_LOG=trace,embassy_hal_internal=debug,embassy_net_esp_hosted=debug,cyw43=info,cyw43_pio=info,smoltcp=info | 12 | export DEFMT_LOG=trace,embassy_hal_internal=debug,embassy_net_esp_hosted=debug,cyw43=info,cyw43_pio=info,smoltcp=info |
| 7 | if [[ -z "${CARGO_TARGET_DIR}" ]]; then | 13 | if [[ -z "${CARGO_TARGET_DIR}" ]]; then |
diff --git a/embassy-executor/build_common.rs b/embassy-executor/build_common.rs index 2c65f8529..0487eb3c5 100644 --- a/embassy-executor/build_common.rs +++ b/embassy-executor/build_common.rs | |||
| @@ -70,6 +70,10 @@ impl CfgSet { | |||
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | fn is_rustc_nightly() -> bool { | 72 | fn is_rustc_nightly() -> bool { |
| 73 | if env::var_os("EMBASSY_FORCE_CHECK_CFG").is_some() { | ||
| 74 | return true; | ||
| 75 | } | ||
| 76 | |||
| 73 | let rustc = env::var_os("RUSTC").unwrap_or_else(|| OsString::from("rustc")); | 77 | let rustc = env::var_os("RUSTC").unwrap_or_else(|| OsString::from("rustc")); |
| 74 | 78 | ||
| 75 | let output = Command::new(rustc) | 79 | let output = Command::new(rustc) |
diff --git a/embassy-hal-internal/build_common.rs b/embassy-hal-internal/build_common.rs index 2c65f8529..0487eb3c5 100644 --- a/embassy-hal-internal/build_common.rs +++ b/embassy-hal-internal/build_common.rs | |||
| @@ -70,6 +70,10 @@ impl CfgSet { | |||
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | fn is_rustc_nightly() -> bool { | 72 | fn is_rustc_nightly() -> bool { |
| 73 | if env::var_os("EMBASSY_FORCE_CHECK_CFG").is_some() { | ||
| 74 | return true; | ||
| 75 | } | ||
| 76 | |||
| 73 | let rustc = env::var_os("RUSTC").unwrap_or_else(|| OsString::from("rustc")); | 77 | let rustc = env::var_os("RUSTC").unwrap_or_else(|| OsString::from("rustc")); |
| 74 | 78 | ||
| 75 | let output = Command::new(rustc) | 79 | let output = Command::new(rustc) |
diff --git a/embassy-stm32/build_common.rs b/embassy-stm32/build_common.rs index 2c65f8529..0487eb3c5 100644 --- a/embassy-stm32/build_common.rs +++ b/embassy-stm32/build_common.rs | |||
| @@ -70,6 +70,10 @@ impl CfgSet { | |||
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | fn is_rustc_nightly() -> bool { | 72 | fn is_rustc_nightly() -> bool { |
| 73 | if env::var_os("EMBASSY_FORCE_CHECK_CFG").is_some() { | ||
| 74 | return true; | ||
| 75 | } | ||
| 76 | |||
| 73 | let rustc = env::var_os("RUSTC").unwrap_or_else(|| OsString::from("rustc")); | 77 | let rustc = env::var_os("RUSTC").unwrap_or_else(|| OsString::from("rustc")); |
| 74 | 78 | ||
| 75 | let output = Command::new(rustc) | 79 | let output = Command::new(rustc) |
diff --git a/embassy-sync/build_common.rs b/embassy-sync/build_common.rs index 2c65f8529..0487eb3c5 100644 --- a/embassy-sync/build_common.rs +++ b/embassy-sync/build_common.rs | |||
| @@ -70,6 +70,10 @@ impl CfgSet { | |||
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | fn is_rustc_nightly() -> bool { | 72 | fn is_rustc_nightly() -> bool { |
| 73 | if env::var_os("EMBASSY_FORCE_CHECK_CFG").is_some() { | ||
| 74 | return true; | ||
| 75 | } | ||
| 76 | |||
| 73 | let rustc = env::var_os("RUSTC").unwrap_or_else(|| OsString::from("rustc")); | 77 | let rustc = env::var_os("RUSTC").unwrap_or_else(|| OsString::from("rustc")); |
| 74 | 78 | ||
| 75 | let output = Command::new(rustc) | 79 | let output = Command::new(rustc) |
diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 57185e217..037fc5c6a 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | [toolchain] | 1 | [toolchain] |
| 2 | channel = "1.78" | 2 | channel = "1.79" |
| 3 | components = [ "rust-src", "rustfmt", "llvm-tools" ] | 3 | components = [ "rust-src", "rustfmt", "llvm-tools" ] |
| 4 | targets = [ | 4 | targets = [ |
| 5 | "thumbv7em-none-eabi", | 5 | "thumbv7em-none-eabi", |
