New asm!() syntax?
On the current nightly, building redox_syscall fails due to RFC 2873 renaming the asm!()
macro to llvm_asm!()
and moving it to be replaced by a new inline assembly syntax. Here's an example of the error message (I get about 6 of these total):
error: the legacy LLVM-style asm! syntax is no longer supported
--> /home/coolreader18/.cargo/registry/src/github.com-1ecc6299db9ec823/redox_syscall-0.1.56/src/io/pio.rs:31:13
|
31 | asm!("in $0, $1" : "={al}"(value) : "{dx}"(self.port) : "memory" : "intel", "volatile");
| ----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| help: replace with: `llvm_asm!`
|
= note: consider migrating to the new asm! syntax specified in RFC 2873
= note: alternatively, switch to llvm_asm! to keep your code working as it is
What would be the best course of action? I understand that redox stays on somewhat up-to-date version of nightly, so would it be ok to update the rust-toolchain in the redox repo and just use either the new asm syntax or the new llvm_asm feature gate? Or maybe have a build.rs check whether the nightly version calls the llvm asm macro llvm_asm!() or asm!() and do conditional compilation off of that?