This is an archive of the discontinued LLVM Phabricator instance.

[IAS] Teach -cc1as about the 'target-abi' option.
ClosedPublic

Authored by tomatabacu on Feb 26 2015, 3:34 AM.

Details

Summary

When using the IAS from clang, the 'target-abi' option gets passed to cc1as, but cc1as doesn't know about it and gives an "unknown argument" error.

This is fixed by adding the 'CC1AsOption' flag to the 'target-abi' option in CC1Options.td.

Diff Detail

Event Timeline

tomatabacu updated this revision to Diff 20741.Feb 26 2015, 3:34 AM
tomatabacu retitled this revision from to [IAS] Teach -cc1as about the 'target-abi' option..
tomatabacu updated this object.
tomatabacu edited the test plan for this revision. (Show Details)
tomatabacu added a subscriber: Unknown Object (MLST).

The testing probably needs improving, seeing as it's only covering the MIPS ABIs, but I'd like to know if I've approached this correctly first.

atanasyan edited edge metadata.Feb 26 2015, 5:05 AM

I would try to keep the mips-integrated-as.s unchanged and write another test case where explicitly invoke the clang with -cc1as and -target-abi options. That allows to check that the -target-abi option is not rejected and really affects output.

tomatabacu updated this revision to Diff 20847.Feb 27 2015, 5:41 AM
tomatabacu edited edge metadata.

Made a new test which uses cc1as directly, as suggested by Simon.

dsanders accepted this revision.Mar 2 2015, 2:24 AM
dsanders edited edge metadata.

LGTM

This revision is now accepted and ready to land.Mar 2 2015, 2:24 AM
echristo edited edge metadata.Mar 3 2015, 10:59 AM

I don't think it's necessary to test that each ABI isn't ignored. Just one will be fine.

-eric

tomatabacu updated this revision to Diff 21179.Mar 4 2015, 1:41 AM
tomatabacu edited edge metadata.

Removed unnecessary target-abi checks.

tomatabacu closed this revision.Mar 4 2015, 6:26 AM

Comment inline.

test/Driver/target-abi-cc1as.s
5

This means you can just do a CHECK line here.

Replied to inline comment.

test/Driver/target-abi-cc1as.s
5

Fixed in the recommit r231363 (which happened because of buildbot failures).