From 3d69bba834a7a6e4603621f1f1d0c4799d40afea Mon Sep 17 00:00:00 2001 From: Juraj Sadel Date: Thu, 24 Feb 2022 12:00:31 +0100 Subject: [PATCH] build: fix asm! build error for Rust1.59.0.0 --- components/rustlib/src/lib.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/components/rustlib/src/lib.rs b/components/rustlib/src/lib.rs index bfff372..c10bbbc 100644 --- a/components/rustlib/src/lib.rs +++ b/components/rustlib/src/lib.rs @@ -1,7 +1,12 @@ #![cfg_attr(not(feature = "std"), no_std)] -#![feature(asm)] -#![cfg_attr(target_arch = "xtensa", feature(asm_experimental_arch))] +#![cfg_attr(not(version("1.59")), feature(asm))] +#![cfg_attr( + all(version("1.58"), target_arch = "xtensa"), + feature(asm_experimental_arch) + )] +#![feature(cfg_version)] +use core::arch::asm; #[cfg(not(feature = "std"))] use core::panic::PanicInfo;