[RISCV][Driver] Make the ordering of CmdArgs consistent between RISCV::Linker and...
authorShihPo Hung <shihpo.hung@sifive.com>
Mon, 19 Apr 2021 02:05:20 +0000 (19:05 -0700)
committerShihPo Hung <shihpo.hung@sifive.com>
Mon, 19 Apr 2021 02:05:20 +0000 (19:05 -0700)
commit27edaee84e3ea4d160f742db0b4a04e236c4e26e
tree7425758bbabf1a609933962aa670b869f928c26d
parent8969762fb1cf3b05adef5d6158b080548a9363e2
[RISCV][Driver] Make the ordering of CmdArgs consistent between RISCV::Linker and baremetal::Linker

In baremetal::Linker::ConstructJob, LinkerInput is handled prior to T_Group options,
but on the other side in RISCV::Linker::ConstructJob, it is opposite.

We want it to be consistent whether users are using RISCV::Linker or baremetal::Linker.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D100615
clang/lib/Driver/ToolChains/RISCVToolchain.cpp
clang/test/Driver/riscv-args.c [new file with mode: 0644]