[PATCH] D146757: [Driver] Enable defining multilib flags verbatim

Petr Hosek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 23 01:34:08 PDT 2023


phosek added a comment.

I apologize about the delayed response. I had time to think about this a bit more and it's not really clear to me if we need to preserve the "plus/minus" flag syntax. Looking through the history, it seems that it was introduced in D2538 <https://reviews.llvm.org/D2538> without any discussion but I always considered it to be confusing and potentially error-prone. Rather than supporting two different syntaxes, which introduces more complexity, I'd prefer having just one. I can of think of two approaches:

1. Have two separate lists of include and exclude flags.
2. Store flags as a tuple (or a struct?) of string and a tag (that is include or exclude).

Do you have any preference between one these two approaches? Can you think of alternatives? It's going to take a bit of effort to migrate all the existing use cases of the "plus/minus" syntax, but I hope it should be mostly mechanical. I'd be happy to help with the migration once we settle on an API.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146757/new/

https://reviews.llvm.org/D146757



More information about the cfe-commits mailing list