This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Pass -target-abi to -cc1as
ClosedPublic

Authored by rogfer01 on Mar 13 2019, 7:03 AM.

Details

Summary

The RISC-V assembler needs the target ABI because it defines a flag of the 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

Diff Detail

Repository
rL LLVM

Event Timeline

rogfer01 created this revision.Mar 13 2019, 7:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 13 2019, 7:03 AM
asb accepted this revision.Mar 24 2019, 10:23 AM

Thanks, LGTM.

This revision is now accepted and ready to land.Mar 24 2019, 10:23 AM

Thanks Alex. I will commit it shortly.

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMar 26 2019, 1:00 AM