[RISCV] Pass -mno-relax to assembler when -fno-integrated-as specified
authorluxufan <xufan@nj.iscas.ac.cn>
Tue, 8 Mar 2022 11:28:10 +0000 (19:28 +0800)
committerluxufan <luxufan@iscas.ac.cn>
Mon, 18 Apr 2022 03:16:41 +0000 (11:16 +0800)
commit429cbac0390654f90bba18a41799464adf31a5ec
tree2b7afecddb58e15e47f6e7138cc488564a946744
parent5479044bfcea20e77f57e6c29bc63c7e517d8b5a
[RISCV] Pass -mno-relax to assembler when -fno-integrated-as specified

In the past, `clang --target=riscv64-unknown-linux-gnu -mno-relax -c hello.s` will assemble hello.s without relaxation, but `clang --target=riscv64-unknown-linux-gnu -mno-relax -fno-integrated-as -c hello.s` doesn't pass the `-mno-relax` option to assembler, and assemble with relaxation
This patch pass the -mno-relax option to assembler when -fno-integrated-as is specified.

Differential Revision: https://reviews.llvm.org/D120639
clang/lib/Driver/ToolChains/Gnu.cpp
clang/test/Driver/riscv-gnutools.c