[PATCH] D102535: [RISCV] -mno-relax: emit .option norelax
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 19 13:36:29 PDT 2021
MaskRay added a comment.
This is to make `clang -S -mno-relax a.c; clang -S a.s` use no-relax.
I feel that if -mno-relax is really an assembler only option, -Wa,-mno-relax would be more appropriate. And `-mno-relax` should be warned with `-S`.
However, if the compiler (either Clang or GCC) reserves rights to change code generation (likely (as I feel), as it may do something special to aid assemblers), I'll actually prefer `.option norelax` in the emitted assembly output.
I found a random issue discussing relaxation (https://github.com/riscv/riscv-elf-psabi-doc/issues/34) and asked the code generation question there.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102535/new/
https://reviews.llvm.org/D102535
More information about the llvm-commits
mailing list