]> granicus.if.org Git - clang/commit
[RISCV] Pass -target-abi to -cc1as
authorRoger Ferrer Ibanez <rofirrim@gmail.com>
Tue, 26 Mar 2019 08:01:18 +0000 (08:01 +0000)
committerRoger Ferrer Ibanez <rofirrim@gmail.com>
Tue, 26 Mar 2019 08:01:18 +0000 (08:01 +0000)
commita67b0501cbbab83a4a0795365ef9c38f0a6473f6
tree0265049795f4f80180bcd1daa18a15e4a41d04cb
parent9b4841a16a4db0abbaf14a1b8114f568ab564ebc
[RISCV] Pass -target-abi to -cc1as

The RISC-V assembler needs the target ABI because it defines a flag of the ELF
file, as described in [1].

Make clang (the driver) to pass the target ABI to -cc1as in exactly the same
way it does for -cc1.

Currently -cc1as knows about -target-abi but is not handling it. Handle it and
pass it to the MC layer via MCTargetOptions.

[1] https://github.com/riscv/riscv-elf-psabi-doc/blob/master/riscv-elf.md#file-header

Differential Revision: https://reviews.llvm.org/D59298

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@356981 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Driver/ToolChains/Clang.cpp
lib/Driver/ToolChains/Clang.h
test/Driver/riscv-abi.c
tools/driver/cc1as_main.cpp