With this change, the following invocations are treated as errors
(multiple actions are specified):
$ flang-new -fc1 -E -fsyntax-only file.95 $ flang-new -fc1 -fsyntax-only -fsyntax-only file.95
Paths
| Differential D111781
[flang] Make the frontend driver error out when requesting multiple actions ClosedPublic Authored by awarzynski on Oct 14 2021, 1:13 AM.
Details Summary With this change, the following invocations are treated as errors $ flang-new -fc1 -E -fsyntax-only file.95 $ flang-new -fc1 -fsyntax-only -fsyntax-only file.95
Diff Detail
Event TimelineComment Actions NOTE: : Please see the discussion on flang-dev for more context.
Is this the right approach? Shall we ping cfe-dev and see whether they would be interested in something similar? Comment Actions Make sure that all tests pass
Comment Actions This generally looks good. Another possibility would be to allow the specification of the default option. This revision is now accepted and ready to land.Oct 14 2021, 1:26 PM awarzynski added reviewers: rsmith, dblaikie, jansvoboda11, Eugene.Zelenko, Bigcheese.Nov 4 2021, 1:59 AM Comment Actions I've just added reviewers that recently touched llvm/include/llvm/Option/ArgList.h. For a bit of context, this patch addresses some concerns raised here:
I'm not suggesting that a similar change is made in clang -cc1, but I definitely wouldn't mind extending this patch so that it covers both flang-new -cc1 and clang -cc1. Thank you for taking a look! Comment Actions
Both of those links point to the cfe-dev mailing list.
Personally, I don't think this is something we'd want for clang -cc1. The end users only interact with the driver interface (which will never generate multiple actions) and never see/modify the -cc1 invocation. If the Flang community is okay with this change, I don't have any objections. Comment Actions
Sorry for that, updated in the original comment!
Sure thing. And it's helpful to know that people are happy with the "status quo" (for good reasons, as you note below).
That's a very interesting perspective. We don't hit this use-case just yet, because our feature list is still very limited. But we *are* heading in the similar direction (in terms of our workflows). Comment Actions This change will mostly affect Flang compiler developers who use flang-new -fc1 for their work or end-users who want to play with the internals. I know that @PeteSteinfeld is in favor and we have also discussed this on the mailing list and in Flang community calls. AFAIK, people are OK with this change. It does mean that flang-new -fc1 and clang -cc1 will behave a bit differently here, but it's nothing major. If there are no further comments, I will merge this tomorrow. This revision was landed with ongoing or failed builds.Dec 17 2021, 2:10 AM Closed by commit rGd18a9aeae9e6: [flang] Make the frontend driver error out when requesting multiple actions (authored by awarzynski). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 395074 flang/lib/Frontend/CompilerInvocation.cpp
flang/test/Driver/debug-measure-parse-tree.f90
flang/test/Driver/get-definition.f90
flang/test/Driver/multiple-actions-error.f95
flang/test/Driver/werror-parse.f
flang/test/Driver/werror-scan.f
flang/test/Driver/werror-sema.f90
flang/test/Frontend/input-output-file.f90
flang/test/Frontend/multiple-input-files.f90
flang/test/Lower/pre-fir-tree01.f90
flang/test/Lower/pre-fir-tree02.f90
flang/test/Lower/pre-fir-tree03.f90
flang/test/Lower/pre-fir-tree04.f90
flang/test/Lower/pre-fir-tree05.f90
flang/test/Semantics/data09.f90
flang/test/Semantics/data11.f90
flang/test/Semantics/data13.f90
flang/test/Semantics/getdefinition01.f90
flang/test/Semantics/getdefinition02.f
flang/test/Semantics/getdefinition03-a.f90
flang/test/Semantics/getdefinition04.f90
flang/test/Semantics/getdefinition05.f90
flang/test/Semantics/getsymbols01.f90
flang/test/Semantics/getsymbols02.f90
flang/test/Semantics/getsymbols03-a.f90
flang/test/Semantics/getsymbols04.f90
flang/test/Semantics/getsymbols05.f90
llvm/include/llvm/Option/ArgList.h
|