This is an archive of the discontinued LLVM Phabricator instance.

[ADT][Triple] Add environment kinds for LoongArch GNU multiarch tuples
ClosedPublic

Authored by xen0n on Oct 11 2022, 11:51 PM.

Details

Summary

The canonical multiarch tuples for LoongArch are defined in [the
LoongArch toolchain conventions][1] document. As the musl port is still
WIP, only the GNU triples are added for now.

The spec mentions loongarch64-linux-gnuf64, which is functionally the
same as the existing loongarch64-linux-gnu triple, only with the
floating-point ABI part explicitly spelled out. Both forms are
supported, but normalization of one into another is not implemented in
this patch, to give the ecosystem some time to experiment and discuss.

[1]: https://loongson.github.io/LoongArch-Documentation/LoongArch-toolchain-conventions-EN.html

Diff Detail

Event Timeline

xen0n created this revision.Oct 11 2022, 11:51 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 11 2022, 11:51 PM
xen0n requested review of this revision.Oct 11 2022, 11:51 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 11 2022, 11:51 PM

The target triple encodes some major ABI variants (e.g. ILP32, LP64). https://loongson.github.io/LoongArch-Documentation/LoongArch-toolchain-conventions-EN.html seems to encode every variant as a new triple which I am unsure is a good idea.
If f64 indicates the generic purpose variant, gnuf64 seems unnecessary - can be replaced with gnu.

The musl maintainer has strong opinions on target triples. I suggest that you bring up the target triple discussion to the musl mailing list.

The musl maintainer has strong opinions on target triples. I suggest that you bring up the target triple discussion to the musl mailing list.

Should we leave musl triplets for another differential?

The musl maintainer has strong opinions on target triples. I suggest that you bring up the target triple discussion to the musl mailing list.

Should we leave musl triplets for another differential?

LG

xen0n updated this revision to Diff 473479.Nov 5 2022, 8:56 PM

Only keep the GNU triple bits for now.

xen0n retitled this revision from [ADT][Triple] Add environment kinds for LoongArch multiarch tuples to [ADT][Triple] Add environment kinds for LoongArch GNU multiarch tuples.Nov 5 2022, 8:57 PM
xen0n edited the summary of this revision. (Show Details)
MaskRay accepted this revision.Nov 6 2022, 12:32 AM

Looks great!

This revision is now accepted and ready to land.Nov 6 2022, 12:32 AM
This revision was landed with ongoing or failed builds.Nov 9 2022, 11:05 PM
This revision was automatically updated to reflect the committed changes.