[PATCH] D121118: [flang] Add OpenMP flag to bbc

Andrzej Warzynski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 8 10:10:50 PST 2022


awarzynski added a comment.

Sorry, I digressed a bit.

In D121118#3367576 <https://reviews.llvm.org/D121118#3367576>, @clementval wrote:

> Maybe a solution would be to push these options in the `CLOptions.inc` so they are not duplicated?

Sadly, that wouldn't help. Options for `flang-new` are defined in Options.td (e.g. -fopenmp <https://github.com/llvm/llvm-project/blob/main/clang/include/clang/Driver/Options.td#L2443-L2444>).  Also, `bbc` uses the `llvm::cl` API, which registers options globally. This can lead to some annoying behavior (e.g. `Error: Option 'some-option' registered more than once!`).

Personally, I feel that landing https://reviews.llvm.org/D121198 and then adding an extra `RUN` line here (with `flang-new`) would put us in a much better position. The redundancy would be both documented and tested at the same time.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D121118



More information about the llvm-commits mailing list