GCC on AIX primarily uses the -maix32 and -maix64 to select the bitmode to target. In order to be compatible with existing build configurations, clang should accept these options as well. In this patch we implement these options for AIX targets.
Details
Details
Diff Detail
Diff Detail
Unit Tests
Unit Tests
Event Timeline
Comment Actions
Should we not still throw a warning/error if someone uses these flags on other platforms?
If I use these flags on GCC on Linux, for example, I get an unknown argument error. I understand we don't do extensive checking for bitmode combinations, so is target checking something to add in the future?
clang/lib/Driver/Driver.cpp | ||
---|---|---|
598 ↗ | (On Diff #504840) | It'd be nice to leverage the TargetSpecific mechanism introduced in D151590 to simplify code here. |
602 ↗ | (On Diff #504840) | Does AIX use -m32/-m64? If not, reject the two options on AIX. It may be cleaner to do if (AIX) { ... // introduce a new block of code here } else { existing `Target.setEnvironment` code } -mx32 is x86-specific |