mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
0cd8de3843
Add `-Zsanitize=kernel-hwaddress` The Linux kernel has a config option called `CONFIG_KASAN_SW_TAGS` that enables `-fsanitize=kernel-hwaddress`. This is not supported by Rust. One slightly awkward detail is that `#[sanitize(address = "off")]` applies to both `-Zsanitize=address` and `-Zsanitize=kernel-address`. Probably it was done this way because both are the same LLVM pass. I replicated this logic here for hwaddress, but it might be undesirable. Note that `#[sanitize(kernel_hwaddress = "off")]` could be supported as an annotation on statics, but since it's also missing for `#[sanitize(hwaddress = "off")]`, I did not add it. MCP: https://github.com/rust-lang/compiler-team/issues/975 Tracking issue: https://github.com/rust-lang/rust/issues/154171 cc @rcvalle @maurer @ojeda
The codegen crate contains the code to convert from MIR into LLVM IR,
and then from LLVM IR into machine code. In general it contains code
that runs towards the end of the compilation process.
For more information about how codegen works, see the rustc dev guide.