This is an archive of the discontinued LLVM Phabricator instance.

[Driver] Don't forward -m[no-]unaligned-access options to GCC when assembling/linking
ClosedPublic

Authored by mcrosier on Mar 30 2018, 7:55 AM.

Diff Detail

Repository
rC Clang

Event Timeline

mcrosier created this revision.Mar 30 2018, 7:55 AM
mcrosier added a subscriber: chapuni.
mcrosier edited the summary of this revision. (Show Details)Mar 30 2018, 8:01 AM

Should we instead be translating and passing the option expected? At any rate, it looks like we're stripping out in ConstructJob rather than forwardToGCC typically.

lib/Driver/ToolChains/Gnu.cpp
46

effect->affect

espindola edited reviewers, added: espindola; removed: rafael.Apr 2 2018, 5:22 PM

Can we instead drop support for using gcc as an assembler?

Can we instead drop support for using gcc as an assembler?

I'd prefer not at the moment, being able to use an external assembler could be useful? Maybe having support as a "-fuse-as" with no argument cleaning would be something we could do?

Can we instead drop support for using gcc as an assembler?

I'd prefer not at the moment, being able to use an external assembler could be useful? Maybe having support as a "-fuse-as" with no argument cleaning would be something we could do?

We could add a -fuse-as as a convenience, but similar to -fuse-ld it should call as directly, not via gcc.

It should currently be possible to select the assembler with -B too.

Can we instead drop support for using gcc as an assembler?

I'd prefer not at the moment, being able to use an external assembler could be useful? Maybe having support as a "-fuse-as" with no argument cleaning would be something we could do?

We could add a -fuse-as as a convenience, but similar to -fuse-ld it should call as directly, not via gcc.

It should currently be possible to select the assembler with -B too.

Ah well, I just find it nicer to use gcc as an interface if we're doing that. No one should really use it otherwise.

mcrosier updated this revision to Diff 141901.Apr 10 2018, 1:35 PM

Update based on Eric's feedback.

Should we instead be translating and passing the option expected?

My understanding is that these are compile-time only flags, so I'm not sure there's much value in translating them and then passing them to GCC unless I've missed something.

mcrosier updated this revision to Diff 141908.Apr 10 2018, 2:13 PM
echristo accepted this revision.Apr 10 2018, 10:45 PM

Should we instead be translating and passing the option expected?

My understanding is that these are compile-time only flags, so I'm not sure there's much value in translating them and then passing them to GCC unless I've missed something.

Good point :)

-eric

This revision is now accepted and ready to land.Apr 10 2018, 10:45 PM

Thanks, Eric!

This revision was automatically updated to reflect the committed changes.