powerpc64-ibm-aix: fix cfg(target_abi) value - #162325
Conversation
|
r? @TaKO8Ki rustbot has assigned @TaKO8Ki. Use Why was this reviewer chosen?The reviewer was selected based on:
|
| // FIXME: using `cfg_abi` here is wrong -- that's not a source of truth, it's just | ||
| // what we display to the user. Instead we need to check the knob that controls | ||
| // whether the ABI is actually used. Currently there is no such knob, a Rust target | ||
| // can therefore never actually use `vec-extabi`. |
There was a problem hiding this comment.
There was a problem hiding this comment.
Yeah, I think it's fine to always emit error here. If you decide to use vec-default as the default, enabling vec-extabi will likely require adding a target modifier, so there's no need to refer to the cfg_abi.
This comment has been minimized.
This comment has been minimized.
|
Cc @xingxue-ibm who actively works on libc for AIX. xingxue, consider adding yourself to https://github.com/rust-lang/rust/blob/31c76a10a742d10a749ab4e19cec324864314b70/src/doc/rustc/src/platform-support/aix.md so people other than me know that :) |
|
My impression is that the target maintainer at the time wanted to enable the If the current target maintainer wants to leave it disabled, I think this should be fine. |
|
Cc @ecnelises |
Our powerpc64-ibm-aix target currently sets
cfg_abito "vec-extabi", which means that programs compiled for this target think they use that ABI. Even our inline asm logic trusts this field. But that's a lie, we're actually using the default ABI since we are never settingEnableAIXExtendedAltivecABIon the LLVM side. We should fix that discrepancy.Between changing how we generate the code, and changing the label we put into
cfg_abi, the latter is the less risky change. So let's do that.This has been tried before in #153830. We then decided to wait a bit while the target maintainers investigate whether they want to change the ABI or not. I think we have waited long enough. The last comment from them that I found is this one which says "I'd conclude the extend vector ABI should be disabled for now"; there have been further questions but no further communication. We can always still change the ABI in the future, but for now let's fix the obvious bug where the ABI we report in
cfg_abidoes not match the actual ABI we are compiling for.Cc @Gelbpunkt @daltenty @gilamn5tr @amy-kwan @taiki-e