[PATCH] D130190: [Driver] Error for -gsplit-dwarf with RISC-V linker relaxation
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 21 10:30:38 PDT 2022
MaskRay added inline comments.
================
Comment at: clang/lib/Driver/ToolChains/Arch/RISCV.cpp:146
+ Arg *A;
+ if (getDebugFissionKind(D, Args, A) != DwarfFissionKind::None)
+ D.Diag(clang::diag::err_drv_riscv_unsupported_with_linker_relaxation)
----------------
compnerd wrote:
> MaskRay wrote:
> > compnerd wrote:
> > > This should be hoisted out, this will occur with or without relaxation. That is, `-mrelax` and `-mno-relax` are both problematic.
> > No. -mno-relax is supported with -gsplit-dwarf. I think the current code is correct.
> No, that is the point, it is not. Building with `-mno-relax` and `-gsplit-dwarf` will fail with the same behaviour.
OK, I confirm. `-mno-relax -gsplit-dwarf` should be compatible and can be fixed separated (e.g. by your D130206, I suspect it doesn't cover all cases).
`-mrelax -gsplit-dwarf` will likely stay unsupported for a while so the driver error will not hurt.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130190/new/
https://reviews.llvm.org/D130190
More information about the cfe-commits
mailing list