[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

Simon Tatham via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 14 01:50:13 PST 2023


statham-arm wrote:

> my only concern is to make sure we don't unintentionally make it harder to integrate potential future extensions such as the mutually dependent groups.

Hmmm. So if you had both ME and MD groups, you might also need a _group_ to be able to be a member of another group? That way you could specify hierarchies such as "must have all of: A, B, and exactly one of C,D" (a MD group one of whose members is a ME group), or "must have at most one of: (all of A,B,C) or (all of U,V,W)" (a ME group containing MD groups).

I suppose that makes sense, and the only change it needs to your structure is that maybe later a group record might also need to have a `Group:` or `Parent:` header. But there's no need to put that part in now, only to make sure there's room to add it in future if needed.

Would you accept `Type: Exclusive` instead of `Exclusive: True`? It seems more plausible to me that there might be three kinds of group that _can't_ go together than three group-type flags that you can have in any combination.

> although that may not necessarily be a bad thing since you could also warn if someone accidentally tries to use a group that wasn't previously defined (e.g. when making a typo).

That is true.

https://github.com/llvm/llvm-project/pull/69447


More information about the cfe-commits mailing list