Clang error: A is unsupported with RISC-V linker relaxation (-mrelax) (err_drv_riscv_unsupported_with_linker_relaxation)
Jump to navigation
Jump to search
Text | error: A is unsupported with RISC-V linker relaxation (-mrelax) (since 15.0) |
---|---|
Type | Error |
Category | None (since 15.0) |
Internal Id | err_drv_riscv_unsupported_with_linker_relaxation (since 15.0) |
Internal Message | %0 is unsupported with RISC-V linker relaxation (-mrelax) (since 15.0)
|
Regular Expression | (?:error|fatal error)\: (.*?) is unsupported with RISC\-V linker relaxation \(\-mrelax\)
|
First Commit | 2022-05-06 aef03c9b3bed [clang][auto-init] Deprecate -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clan... |
Description
Example
Flags | -target riscv64-unknown-elf -xc -mrelax -gsplit-dwarf
|
|
---|---|---|
Source |
// -gsplit-dwarf flag
int main() {}
| |
Compiler Output |
clang++: error: -gsplit-dwarf is unsupported with RISC-V linker relaxation (-mrelax) |
Clang Internals (17.0.6)
Git Commit Message
[clang][auto-init] Deprecate -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang GCC 12 has been released and contains unconditional support for -ftrivial-auto-var-init=zero: https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-ftrivial-auto-var-init Maintain compatibility with GCC, and remove the -enable flag for "zero" mode. The flag is left to generate an "unused" warning, though, to not break all the existing users. The flag will be fully removed in Clang 17. Link: https://github.com/llvm/llvm-project/issues/44842 Reviewed By: nickdesaulniers, MaskRay, srhines, xbolva00 Differential Revision: https://reviews.llvm.org/D125142
Used in Clang Sources
This section lists all occurrences of the diagnostic within the Clang's codebase. For each occurrence, an auto-extracted snipped from the source code is listed including key elements like control structures, functions, or classes. It should illustrate the conditions under which the diagnostic is activated.
clang/lib/Driver/ToolChains/Arch/RISCV.cpp (line 157)
void riscv::getRISCVTargetFeatures(const Driver &D, const llvm::Triple &Triple, const ArgList &Args, std::vector<StringRef> &Features) {
// ...
// -mrelax is default, unless -mno-relax is specified.
if (Args.hasFlag(options::OPT_mrelax, options::OPT_mno_relax, true)) {
// ...
if (getDebugFissionKind(D, Args, A) != DwarfFissionKind::None)
D.Diag(clang::diag::err_drv_riscv_unsupported_with_linker_relaxation) << A->getAsString(Args);