[PATCH] D54378: Add Hurd triplet

Renato Golin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 10 09:09:27 PST 2018


rengolin added a comment.

In https://reviews.llvm.org/D54378#1294266, @chandlerc wrote:

> I really do find the break with convention here somewhat deeply unfortunate. It makes parsing and recognizing triples reliably much harder IMO. This really should be 'hurd-gnu' or 'mach-gnu' (or however you want to spell the 'OS' here).


It's already too hard as it is. I was trying to grep lines from Triple.cpp to see if we already had conflicting names between OS and Env, but wasn't very successful.

Glancing with the eye, I didn't find anything conflicting, <unrelated> but there seems to be a "cloudabi" in the OS type, which is weird. </unrelated>

> If the only way to support this is to use the existing name, I still think that accepting arbitrary suffixes is a mistake. What do they mean? What do we do with them when canonicalizing? If there are suffixes, we need to know how to parse them and to do so accurately.

I don't want to create another target parser... :(

The TargetParser was introduced for Arm because we have a similar problem and it's is a big mess. But those names are used pretty much everywhere and we have no other choice (like why Windows9 had to become Windows10).

On the other hand, as Kristina said, Hurd's *IS* an experimental OS. I don't think it ever will _not_ be. The weight it has on the complexity of parsing should be considered from that point of view.

Hurd's parsing itself may not be complicated (assuming only version numbers can come after, etc), "gnu" starts a good number of other environments, which are already carefully ordered in `parseEnvironment`.


https://reviews.llvm.org/D54378





More information about the llvm-commits mailing list