[PATCH] D142933: Add -print-multi-selection-flags argument

2023-02-22 Thread Michael Platings via Phabricator via cfe-commits
michaelplatings updated this revision to Diff 499450. michaelplatings marked 2 inline comments as done. michaelplatings added a comment. Remove braces and blank lines as requested by @MaskRay Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142933/new/

[PATCH] D142933: Add -print-multi-selection-flags argument

2023-02-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. > Add -print-multi-selection-flags argument "option" is a better term. Since the option doesn't take an argument, "flag" applies as well. `[Driver] Add -print-multi-selection-flags` The summary is empty. Is that intended? We need some description what the new option d

[PATCH] D142933: Add -print-multi-selection-flags argument

2023-02-10 Thread Peter Smith via Phabricator via cfe-commits
peter.smith added a comment. Thanks for the updates, changes look good to me. I think that we can get away without trying to break the floating point options into flags, at least for how floating point units are available in hardware today. Comment at: clang/lib/Driver/ToolCh

[PATCH] D142933: Add -print-multi-selection-flags argument

2023-02-07 Thread Michael Platings via Phabricator via cfe-commits
michaelplatings added inline comments. Comment at: clang/include/clang/Driver/Options.td:4162 def print_multi_lib : Flag<["-", "--"], "print-multi-lib">; +def print_multi_selection_flags : Flag<["-", "--"], "print-multi-selection-flags-experimental">, + HelpText<"Print the fla

[PATCH] D142933: Add -print-multi-selection-flags argument

2023-02-07 Thread Michael Platings via Phabricator via cfe-commits
michaelplatings updated this revision to Diff 495656. michaelplatings marked 6 inline comments as done. michaelplatings added a comment. Apply improvements suggested by @peter.smith Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142933/new/ https://

[PATCH] D142933: Add -print-multi-selection-flags argument

2023-02-07 Thread Michael Platings via Phabricator via cfe-commits
michaelplatings updated this revision to Diff 49. michaelplatings added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142933/new/ https://reviews.llvm.org/D142933 Files: clang/include/clang/Driver/Options.td clang/include

[PATCH] D142933: Add -print-multi-selection-flags argument

2023-02-06 Thread Peter Smith via Phabricator via cfe-commits
peter.smith added inline comments. Comment at: clang/include/clang/Driver/Options.td:4162 def print_multi_lib : Flag<["-", "--"], "print-multi-lib">; +def print_multi_selection_flags : Flag<["-", "--"], "print-multi-selection-flags-experimental">, + HelpText<"Print the flags u

[PATCH] D142933: Add -print-multi-selection-flags argument

2023-02-03 Thread Michael Platings via Phabricator via cfe-commits
michaelplatings updated this revision to Diff 494610. michaelplatings added a comment. Bugfix: if -msoft-float is set then -mfpu should be none. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142933/new/ https://reviews.llvm.org/D142933 Files: cl

[PATCH] D142933: Add -print-multi-selection-flags argument

2023-02-02 Thread Michael Platings via Phabricator via cfe-commits
michaelplatings marked an inline comment as done. michaelplatings added inline comments. Comment at: clang/lib/Driver/Driver.cpp:2213 + if (C.getArgs().hasArg(options::OPT_print_multi_selection_flags)) { +for (StringRef Attr : TC.getMultiSelectionFlags(C.getArgs())) + l

[PATCH] D142933: Add -print-multi-selection-flags argument

2023-02-02 Thread Michael Platings via Phabricator via cfe-commits
michaelplatings updated this revision to Diff 494420. michaelplatings added a comment. Print flags expanded by any regular expression matchers in multilib.yaml Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142933/new/ https://reviews.llvm.org/D1429

[PATCH] D142933: Add -print-multi-selection-flags argument

2023-02-02 Thread Michael Platings via Phabricator via cfe-commits
michaelplatings updated this revision to Diff 494371. michaelplatings added a comment. Put "experimental" in the argument name. The intention is to include the new multilib as an experimental feature in LLVM 17 and stabilise it in LLVM 18. Also remove support for -f(no-)experimental-relative-c++

[PATCH] D142933: Add -print-multi-selection-flags argument

2023-02-02 Thread Michael Platings via Phabricator via cfe-commits
michaelplatings added a comment. In D142933#4099043 , @Joe wrote: > I did briefly try to pass a ToolChain to Gnu.cpp functions, but it became > intrusive and had to add it in 5+ places, so unless I'm missing a trick to > get the ToolChain from the Drive

[PATCH] D142933: Add -print-multi-selection-flags argument

2023-02-02 Thread Michael Platings via Phabricator via cfe-commits
michaelplatings marked an inline comment as done. michaelplatings added a comment. In D142933#4099587 , @Joe wrote: > Would it be weird for one target to have the `march=` but anothers not? Yes I think it would be weird. Potentially you could have a tool

[PATCH] D142933: Add -print-multi-selection-flags argument

2023-02-02 Thread Joseph Faulls via Phabricator via cfe-commits
Joe added a comment. > Thanks for explaining. I found that when I was writing a regex to match flags > it was helpful to have a part of the string I could be sure would be there to > avoid matching the wrong type of flag, and `march=` helped with that. I also > worry that names from different

[PATCH] D142933: Add -print-multi-selection-flags argument

2023-02-02 Thread Michael Platings via Phabricator via cfe-commits
michaelplatings added a comment. In D142933#4099043 , @Joe wrote: > I did briefly try to pass a ToolChain to Gnu.cpp functions, but it became > intrusive and had to add it in 5+ places, so unless I'm missing a trick to > get the ToolChain from the Drive

[PATCH] D142933: Add -print-multi-selection-flags argument

2023-02-02 Thread Joseph Faulls via Phabricator via cfe-commits
Joe added a comment. >> The main trouble I had was at that point we don't have a reference to the >> ToolChain, so calling `getMultiSelectionFlags` was not possible. [...] I'm >> not sure what the solution here is. > > I see two options: > > 1. Split getMultiSelectionFlags into needs-ToolChain

[PATCH] D142933: Add -print-multi-selection-flags argument

2023-02-01 Thread Michael Platings via Phabricator via cfe-commits
michaelplatings added a comment. > The main trouble I had was at that point we don't have a reference to the > ToolChain, so calling `getMultiSelectionFlags` was not possible. [...] I'm > not sure what the solution here is. I see two options: 1. Split getMultiSelectionFlags into needs-ToolChai

[PATCH] D142933: Add -print-multi-selection-flags argument

2023-02-01 Thread Joseph Faulls via Phabricator via cfe-commits
Joe added a comment. So again, I took these patches for a spin with RISC-V. As I mentioned before, I was using a GCC installation, so the multilib selection happens inside Gnu.cpp (findRISCVBareMetalMultilibs). The main trouble I had was at that point we don't have a reference to the ToolChain,

[PATCH] D142933: Add -print-multi-selection-flags argument

2023-01-30 Thread Michael Platings via Phabricator via cfe-commits
michaelplatings created this revision. michaelplatings added reviewers: phosek, lenary, simon_tatham. Herald added subscribers: abrachet, mgrang. Herald added a project: All. michaelplatings requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: c