Closed
Description
Code
// Compile with: rustc --target riscv64imac-unknown-none-elf -C target-feature=+relax test.rs --emit=obj
#![no_std]
#![no_main]
use core::panic::PanicInfo;
#[panic_handler]
fn panic(_info: &PanicInfo) -> ! {
loop {}
}
Current output
warning: unknown feature specified for `-Ctarget-feature`: `relax`
|
= note: it is still passed through to the codegen backend
= help: consider filing a feature request
warning: 1 warning emitted
Desired output
No warning.
Rationale and extra context
I would like to enable linker relaxation for the RISC-V target. To do so I passed -C target-feature=+relax
to tell LLVM to use linker relaxation. It seems like rustc
is not aware of this option, so it emits a warning (but the feature is still properly enabled). I can't find any way to disable this warning, so I am submitting this issue in the hopes that either the feature will become recognized, or a way to disable the warning will be added.
Related: #96472.
The program is compiled by running rustc --target riscv64imac-unknown-none-elf -C target-feature=+relax test.rs --emit=obj
Hopefully I've posted this to the correct place. Thanks!
Other cases
No response
Anything else?
No response