[clang] [flang] [flang][driver] Rename `flang-new` as `flang` (PR #74377)
brad0 wrote: > ok, but is there some threshold of percent that pass, or a specific list that > we want to be sure pass? My understanding is that we've been running (at > least a subset of) the gfortran test suite for a while now. What makes the > current results not sufficient? I think it's more of take flang-new and run it through the test suite and provide the output results. https://github.com/llvm/llvm-project/pull/74377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [flang] [flang][driver] Rename `flang-new` as `flang` (PR #74377)
sscalpone wrote: Still gathering feedback https://discourse.llvm.org/t/proposal-rename-flang-new-to-flang/69462/54 https://github.com/llvm/llvm-project/pull/74377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [flang] [flang][driver] Rename `flang-new` as `flang` (PR #74377)
h-vetinari wrote: It appears this PR now has conflicts that need resolving... https://github.com/llvm/llvm-project/pull/74377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [flang] [flang][driver] Rename `flang-new` as `flang` (PR #74377)
https://github.com/banach-space updated https://github.com/llvm/llvm-project/pull/74377 From 1eefb9136ea042e44ada4be66a18b4bf69c18fe3 Mon Sep 17 00:00:00 2001 From: Andrzej Warzynski Date: Sat, 2 Dec 2023 14:01:02 + Subject: [PATCH 1/4] [flang][driver] Rename `flang-new` as `flang` This patch renames `flang-new` as `flang`. Similarly to Clang, Flang's driver executable will be called: * `flang-` A symlink called `flang` pointing at `flang-` will be created at build time. This is consistent with Clang. For backwards compatibility, a symlink `flang-new` pointing to `flang-` is also created. This will be removed in the future. --- clang/lib/Driver/Driver.cpp | 2 +- clang/lib/Driver/ToolChain.cpp| 3 + clang/lib/Driver/ToolChains/Flang.cpp | 10 +-- clang/test/Driver/flang/flang.f90 | 2 +- clang/test/Driver/flang/flang_ucase.F90 | 2 +- .../Driver/flang/multiple-inputs-mixed.f90| 2 +- clang/test/Driver/flang/multiple-inputs.f90 | 4 +- flang/docs/FlangDriver.md | 70 +-- flang/docs/ImplementingASemanticCheck.md | 4 +- flang/docs/Overview.md| 12 ++-- .../FlangOmpReport/FlangOmpReport.cpp | 2 +- .../ExecuteCompilerInvocation.cpp | 3 +- flang/test/CMakeLists.txt | 2 +- flang/test/Driver/compiler-options.f90| 2 +- .../test/Driver/disable-ext-name-interop.f90 | 2 +- flang/test/Driver/driver-help-hidden.f90 | 6 +- flang/test/Driver/driver-version.f90 | 4 +- flang/test/Driver/escaped-backslash.f90 | 4 +- flang/test/Driver/fdefault.f90| 28 flang/test/Driver/flarge-sizes.f90| 20 +++--- flang/test/Driver/frontend-forwarding.f90 | 4 +- flang/test/Driver/intrinsic-module-path.f90 | 2 +- flang/test/Driver/lto-flags.f90 | 2 +- flang/test/Driver/macro-def-undef.F90 | 4 +- flang/test/Driver/missing-input.f90 | 14 ++-- flang/test/Driver/multiple-input-files.f90| 2 +- flang/test/Driver/omp-driver-offload.f90 | 52 +++--- .../predefined-macros-compiler-version.F90| 4 +- flang/test/Driver/std2018-wrong.f90 | 2 +- flang/test/Driver/std2018.f90 | 2 +- .../Driver/supported-suffices/f03-suffix.f03 | 2 +- .../Driver/supported-suffices/f08-suffix.f08 | 2 +- flang/test/Driver/use-module-error.f90| 4 +- flang/test/Driver/use-module.f90 | 4 +- flang/test/Driver/version-loops.f90 | 18 ++--- .../Intrinsics/command_argument_count.f90 | 4 +- flang/test/Lower/Intrinsics/exit.f90 | 2 +- .../test/Lower/Intrinsics/ieee_is_normal.f90 | 2 +- .../OpenMP/Todo/omp-declarative-allocate.f90 | 2 +- .../OpenMP/Todo/omp-declare-reduction.f90 | 2 +- .../Lower/OpenMP/Todo/omp-declare-simd.f90| 2 +- flang/test/lit.cfg.py | 4 +- flang/tools/f18/CMakeLists.txt| 6 +- flang/tools/flang-driver/CMakeLists.txt | 22 -- flang/tools/flang-driver/driver.cpp | 7 +- 45 files changed, 185 insertions(+), 170 deletions(-) diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index e241706b9082ee..e72ea0e427fc70 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -1948,7 +1948,7 @@ void Driver::PrintHelp(bool ShowHidden) const { void Driver::PrintVersion(const Compilation , raw_ostream ) const { if (IsFlangMode()) { -OS << getClangToolFullVersion("flang-new") << '\n'; +OS << getClangToolFullVersion("flang") << '\n'; } else { // FIXME: The following handlers should use a callback mechanism, we don't // know what the client would like to do. diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp index ab19166f18c2dc..eb5bd8d033bb47 100644 --- a/clang/lib/Driver/ToolChain.cpp +++ b/clang/lib/Driver/ToolChain.cpp @@ -310,6 +310,9 @@ static const DriverSuffix *FindDriverSuffix(StringRef ProgName, size_t ) { {"cl", "--driver-mode=cl"}, {"++", "--driver-mode=g++"}, {"flang", "--driver-mode=flang"}, + // For backwards compatibility, we create a symlink for `flang` called + // `flang-new`. This will be removed in the future. + {"flang-new", "--driver-mode=flang"}, {"clang-dxc", "--driver-mode=dxc"}, }; diff --git a/clang/lib/Driver/ToolChains/Flang.cpp b/clang/lib/Driver/ToolChains/Flang.cpp index 9b21fe952af7a8..a885dd759c831b 100644 --- a/clang/lib/Driver/ToolChains/Flang.cpp +++ b/clang/lib/Driver/ToolChains/Flang.cpp @@ -762,14 +762,16 @@ void Flang::ConstructJob(Compilation , const JobAction , CmdArgs.push_back(Input.getFilename()); - // TODO: Replace flang-new with flang once the new driver replaces the - // throwaway driver - const char *Exec = Args.MakeArgString(D.GetProgramPath("flang-new", TC)); + // Get
[clang] [flang] [flang][driver] Rename `flang-new` as `flang` (PR #74377)
@@ -1,15 +1,15 @@ -! Test that flang-new OpenMP and OpenMP offload related +! Test that flang OpenMP and OpenMP offload related ! commands forward or expand to the appropriate commands -! for flang-new -fc1 as expected. Assumes a gfx90a, aarch64, +! for flang -fc1 as expected. Assumes a gfx90a, aarch64, ! and sm_70 architecture, but doesn't require one to be ! installed or compiled for, just testing the appropriate ! generation of jobs are created with the correct ! corresponding arguments. ! Test regular -fopenmp with no offload ! RUN: %flang -### -fopenmp %s 2>&1 | FileCheck --check-prefixes=CHECK-OPENMP %s -! CHECK-OPENMP: "{{[^"]*}}flang-new" "-fc1" {{.*}} "-fopenmp" {{.*}}.f90" -! CHECK-OPENMP-NOT: "{{[^"]*}}flang-new" "-fc1" {{.*}} "-fopenmp" {{.*}} "-fopenmp-is-target-device" {{.*}}.f90" +! CHECK-OPENMP: "{{[^"]*}}flang{{.*}}" "-fc1" {{.*}} "-fopenmp" {{.*}}.f90" banach-space wrote: Thanks, that's a great suggestion! Not sure we started adding the actual binary there. https://github.com/llvm/llvm-project/pull/74377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [flang] [flang][driver] Rename `flang-new` as `flang` (PR #74377)
@@ -15,17 +15,13 @@ local: ``` There are two main drivers in Flang: banach-space wrote: Good point https://github.com/llvm/llvm-project/pull/74377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [flang] [flang][driver] Rename `flang-new` as `flang` (PR #74377)
https://github.com/banach-space edited https://github.com/llvm/llvm-project/pull/74377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [flang] [flang][driver] Rename `flang-new` as `flang` (PR #74377)
https://github.com/banach-space edited https://github.com/llvm/llvm-project/pull/74377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [flang] [flang][driver] Rename `flang-new` as `flang` (PR #74377)
@@ -193,26 +190,29 @@ driver, `clang -cc1` and consists of the following classes: This list is not exhaustive and only covers the main classes that implement the driver. The main entry point for the frontend driver, `fc1_main`, is implemented in `flang/tools/flang-driver/driver.cpp`. It can be accessed by -invoking the compiler driver, `flang-new`, with the `-fc1` flag. +invoking the compiler driver, `flang`, with the `-fc1` flag. The frontend driver will only run one action at a time. If you specify multiple action flags, only the last one will be taken into account. The default action is `ParseSyntaxOnlyAction`, which corresponds to `-fsyntax-only`. In other -words, `flang-new -fc1 ` is equivalent to `flang-new -fc1 -fsyntax-only +words, `flang -fc1 ` is equivalent to `flang -fc1 -fsyntax-only `. ## The `flang-to-external-fc` script -The `flang-to-external-fc` wrapper script for `flang-new` was introduced as a -development tool and to facilitate testing. The `flang-to-external-fc` wrapper -script will: -* use `flang-new` to unparse the input source file (i.e. it will run `flang-new - -fc1 -fdebug-unparse `), and then +The `flang-to-external-fc` wrapper script for `flang` was introduced as a +development tool and to facilitate testing. While code-generation is not +available in Flang, you can use it as a drop-in replacement for other Fortran +compilers in your build scripts. banach-space wrote: Thank you for spotting this (yes, there _is_ code generation) and for the suggestion I would actually like to reduce this paragraph and to eventually remove this script. So I will incorporate your suggestion only partially. https://github.com/llvm/llvm-project/pull/74377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [flang] [flang][driver] Rename `flang-new` as `flang` (PR #74377)
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/74377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [flang] [flang][driver] Rename `flang-new` as `flang` (PR #74377)
https://github.com/h-vetinari edited https://github.com/llvm/llvm-project/pull/74377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [flang] [flang][driver] Rename `flang-new` as `flang` (PR #74377)
https://github.com/h-vetinari commented: Some drive-by comments - very happy to see this happening! https://github.com/llvm/llvm-project/pull/74377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [flang] [flang][driver] Rename `flang-new` as `flang` (PR #74377)
mjklemm wrote: I have a Windows test machine. How can I help? https://github.com/llvm/llvm-project/pull/74377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [flang] [flang][driver] Rename `flang-new` as `flang` (PR #74377)
https://github.com/banach-space updated https://github.com/llvm/llvm-project/pull/74377 From 1eefb9136ea042e44ada4be66a18b4bf69c18fe3 Mon Sep 17 00:00:00 2001 From: Andrzej Warzynski Date: Sat, 2 Dec 2023 14:01:02 + Subject: [PATCH 1/2] [flang][driver] Rename `flang-new` as `flang` This patch renames `flang-new` as `flang`. Similarly to Clang, Flang's driver executable will be called: * `flang-` A symlink called `flang` pointing at `flang-` will be created at build time. This is consistent with Clang. For backwards compatibility, a symlink `flang-new` pointing to `flang-` is also created. This will be removed in the future. --- clang/lib/Driver/Driver.cpp | 2 +- clang/lib/Driver/ToolChain.cpp| 3 + clang/lib/Driver/ToolChains/Flang.cpp | 10 +-- clang/test/Driver/flang/flang.f90 | 2 +- clang/test/Driver/flang/flang_ucase.F90 | 2 +- .../Driver/flang/multiple-inputs-mixed.f90| 2 +- clang/test/Driver/flang/multiple-inputs.f90 | 4 +- flang/docs/FlangDriver.md | 70 +-- flang/docs/ImplementingASemanticCheck.md | 4 +- flang/docs/Overview.md| 12 ++-- .../FlangOmpReport/FlangOmpReport.cpp | 2 +- .../ExecuteCompilerInvocation.cpp | 3 +- flang/test/CMakeLists.txt | 2 +- flang/test/Driver/compiler-options.f90| 2 +- .../test/Driver/disable-ext-name-interop.f90 | 2 +- flang/test/Driver/driver-help-hidden.f90 | 6 +- flang/test/Driver/driver-version.f90 | 4 +- flang/test/Driver/escaped-backslash.f90 | 4 +- flang/test/Driver/fdefault.f90| 28 flang/test/Driver/flarge-sizes.f90| 20 +++--- flang/test/Driver/frontend-forwarding.f90 | 4 +- flang/test/Driver/intrinsic-module-path.f90 | 2 +- flang/test/Driver/lto-flags.f90 | 2 +- flang/test/Driver/macro-def-undef.F90 | 4 +- flang/test/Driver/missing-input.f90 | 14 ++-- flang/test/Driver/multiple-input-files.f90| 2 +- flang/test/Driver/omp-driver-offload.f90 | 52 +++--- .../predefined-macros-compiler-version.F90| 4 +- flang/test/Driver/std2018-wrong.f90 | 2 +- flang/test/Driver/std2018.f90 | 2 +- .../Driver/supported-suffices/f03-suffix.f03 | 2 +- .../Driver/supported-suffices/f08-suffix.f08 | 2 +- flang/test/Driver/use-module-error.f90| 4 +- flang/test/Driver/use-module.f90 | 4 +- flang/test/Driver/version-loops.f90 | 18 ++--- .../Intrinsics/command_argument_count.f90 | 4 +- flang/test/Lower/Intrinsics/exit.f90 | 2 +- .../test/Lower/Intrinsics/ieee_is_normal.f90 | 2 +- .../OpenMP/Todo/omp-declarative-allocate.f90 | 2 +- .../OpenMP/Todo/omp-declare-reduction.f90 | 2 +- .../Lower/OpenMP/Todo/omp-declare-simd.f90| 2 +- flang/test/lit.cfg.py | 4 +- flang/tools/f18/CMakeLists.txt| 6 +- flang/tools/flang-driver/CMakeLists.txt | 22 -- flang/tools/flang-driver/driver.cpp | 7 +- 45 files changed, 185 insertions(+), 170 deletions(-) diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index e241706b9082ee..e72ea0e427fc70 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -1948,7 +1948,7 @@ void Driver::PrintHelp(bool ShowHidden) const { void Driver::PrintVersion(const Compilation , raw_ostream ) const { if (IsFlangMode()) { -OS << getClangToolFullVersion("flang-new") << '\n'; +OS << getClangToolFullVersion("flang") << '\n'; } else { // FIXME: The following handlers should use a callback mechanism, we don't // know what the client would like to do. diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp index ab19166f18c2dc..eb5bd8d033bb47 100644 --- a/clang/lib/Driver/ToolChain.cpp +++ b/clang/lib/Driver/ToolChain.cpp @@ -310,6 +310,9 @@ static const DriverSuffix *FindDriverSuffix(StringRef ProgName, size_t ) { {"cl", "--driver-mode=cl"}, {"++", "--driver-mode=g++"}, {"flang", "--driver-mode=flang"}, + // For backwards compatibility, we create a symlink for `flang` called + // `flang-new`. This will be removed in the future. + {"flang-new", "--driver-mode=flang"}, {"clang-dxc", "--driver-mode=dxc"}, }; diff --git a/clang/lib/Driver/ToolChains/Flang.cpp b/clang/lib/Driver/ToolChains/Flang.cpp index 9b21fe952af7a8..a885dd759c831b 100644 --- a/clang/lib/Driver/ToolChains/Flang.cpp +++ b/clang/lib/Driver/ToolChains/Flang.cpp @@ -762,14 +762,16 @@ void Flang::ConstructJob(Compilation , const JobAction , CmdArgs.push_back(Input.getFilename()); - // TODO: Replace flang-new with flang once the new driver replaces the - // throwaway driver - const char *Exec = Args.MakeArgString(D.GetProgramPath("flang-new", TC)); + // Get
[clang] [flang] [flang][driver] Rename `flang-new` as `flang` (PR #74377)
https://github.com/banach-space updated https://github.com/llvm/llvm-project/pull/74377 From 1eefb9136ea042e44ada4be66a18b4bf69c18fe3 Mon Sep 17 00:00:00 2001 From: Andrzej Warzynski Date: Sat, 2 Dec 2023 14:01:02 + Subject: [PATCH 1/2] [flang][driver] Rename `flang-new` as `flang` This patch renames `flang-new` as `flang`. Similarly to Clang, Flang's driver executable will be called: * `flang-` A symlink called `flang` pointing at `flang-` will be created at build time. This is consistent with Clang. For backwards compatibility, a symlink `flang-new` pointing to `flang-` is also created. This will be removed in the future. --- clang/lib/Driver/Driver.cpp | 2 +- clang/lib/Driver/ToolChain.cpp| 3 + clang/lib/Driver/ToolChains/Flang.cpp | 10 +-- clang/test/Driver/flang/flang.f90 | 2 +- clang/test/Driver/flang/flang_ucase.F90 | 2 +- .../Driver/flang/multiple-inputs-mixed.f90| 2 +- clang/test/Driver/flang/multiple-inputs.f90 | 4 +- flang/docs/FlangDriver.md | 70 +-- flang/docs/ImplementingASemanticCheck.md | 4 +- flang/docs/Overview.md| 12 ++-- .../FlangOmpReport/FlangOmpReport.cpp | 2 +- .../ExecuteCompilerInvocation.cpp | 3 +- flang/test/CMakeLists.txt | 2 +- flang/test/Driver/compiler-options.f90| 2 +- .../test/Driver/disable-ext-name-interop.f90 | 2 +- flang/test/Driver/driver-help-hidden.f90 | 6 +- flang/test/Driver/driver-version.f90 | 4 +- flang/test/Driver/escaped-backslash.f90 | 4 +- flang/test/Driver/fdefault.f90| 28 flang/test/Driver/flarge-sizes.f90| 20 +++--- flang/test/Driver/frontend-forwarding.f90 | 4 +- flang/test/Driver/intrinsic-module-path.f90 | 2 +- flang/test/Driver/lto-flags.f90 | 2 +- flang/test/Driver/macro-def-undef.F90 | 4 +- flang/test/Driver/missing-input.f90 | 14 ++-- flang/test/Driver/multiple-input-files.f90| 2 +- flang/test/Driver/omp-driver-offload.f90 | 52 +++--- .../predefined-macros-compiler-version.F90| 4 +- flang/test/Driver/std2018-wrong.f90 | 2 +- flang/test/Driver/std2018.f90 | 2 +- .../Driver/supported-suffices/f03-suffix.f03 | 2 +- .../Driver/supported-suffices/f08-suffix.f08 | 2 +- flang/test/Driver/use-module-error.f90| 4 +- flang/test/Driver/use-module.f90 | 4 +- flang/test/Driver/version-loops.f90 | 18 ++--- .../Intrinsics/command_argument_count.f90 | 4 +- flang/test/Lower/Intrinsics/exit.f90 | 2 +- .../test/Lower/Intrinsics/ieee_is_normal.f90 | 2 +- .../OpenMP/Todo/omp-declarative-allocate.f90 | 2 +- .../OpenMP/Todo/omp-declare-reduction.f90 | 2 +- .../Lower/OpenMP/Todo/omp-declare-simd.f90| 2 +- flang/test/lit.cfg.py | 4 +- flang/tools/f18/CMakeLists.txt| 6 +- flang/tools/flang-driver/CMakeLists.txt | 22 -- flang/tools/flang-driver/driver.cpp | 7 +- 45 files changed, 185 insertions(+), 170 deletions(-) diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index e241706b9082e..e72ea0e427fc7 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -1948,7 +1948,7 @@ void Driver::PrintHelp(bool ShowHidden) const { void Driver::PrintVersion(const Compilation , raw_ostream ) const { if (IsFlangMode()) { -OS << getClangToolFullVersion("flang-new") << '\n'; +OS << getClangToolFullVersion("flang") << '\n'; } else { // FIXME: The following handlers should use a callback mechanism, we don't // know what the client would like to do. diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp index ab19166f18c2d..eb5bd8d033bb4 100644 --- a/clang/lib/Driver/ToolChain.cpp +++ b/clang/lib/Driver/ToolChain.cpp @@ -310,6 +310,9 @@ static const DriverSuffix *FindDriverSuffix(StringRef ProgName, size_t ) { {"cl", "--driver-mode=cl"}, {"++", "--driver-mode=g++"}, {"flang", "--driver-mode=flang"}, + // For backwards compatibility, we create a symlink for `flang` called + // `flang-new`. This will be removed in the future. + {"flang-new", "--driver-mode=flang"}, {"clang-dxc", "--driver-mode=dxc"}, }; diff --git a/clang/lib/Driver/ToolChains/Flang.cpp b/clang/lib/Driver/ToolChains/Flang.cpp index 9b21fe952af7a..a885dd759c831 100644 --- a/clang/lib/Driver/ToolChains/Flang.cpp +++ b/clang/lib/Driver/ToolChains/Flang.cpp @@ -762,14 +762,16 @@ void Flang::ConstructJob(Compilation , const JobAction , CmdArgs.push_back(Input.getFilename()); - // TODO: Replace flang-new with flang once the new driver replaces the - // throwaway driver - const char *Exec = Args.MakeArgString(D.GetProgramPath("flang-new", TC)); + // Get the
[clang] [flang] [flang][driver] Rename `flang-new` as `flang` (PR #74377)
kiranchandramohan wrote: I am assuming you have got a go-ahead from the code owner and others involved in the discourse discussion. It is probably good to post a link to this patch in the relevant discourse post for information and confirmation. https://github.com/llvm/llvm-project/pull/74377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [flang] [flang][driver] Rename `flang-new` as `flang` (PR #74377)
tschuett wrote: Are you going to add an entry to the [Release Nodes](https://github.com/llvm/llvm-project/blob/main/flang/docs/ReleaseNotes.md)? https://github.com/llvm/llvm-project/pull/74377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [flang] [flang][driver] Rename `flang-new` as `flang` (PR #74377)
llvmbot wrote: @llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-clang Author: Andrzej Warzyński (banach-space) Changes This patch renames `flang-new` as `flang`. Similarly to Clang, Flang's driver executable will be called: * `flang-MAJOR_VERSION` A symlink called `flang` pointing at `flang-MAJOR_VERSION` will be created at build time. This is consistent with Clang. For backwards compatibility, a symlink `flang-new` pointing to `flang-MAJOR_VERSION` is also created. This will be removed in the future. --- Patch is 59.98 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/74377.diff 45 Files Affected: - (modified) clang/lib/Driver/Driver.cpp (+1-1) - (modified) clang/lib/Driver/ToolChain.cpp (+3) - (modified) clang/lib/Driver/ToolChains/Flang.cpp (+6-4) - (modified) clang/test/Driver/flang/flang.f90 (+1-1) - (modified) clang/test/Driver/flang/flang_ucase.F90 (+1-1) - (modified) clang/test/Driver/flang/multiple-inputs-mixed.f90 (+1-1) - (modified) clang/test/Driver/flang/multiple-inputs.f90 (+2-2) - (modified) flang/docs/FlangDriver.md (+35-35) - (modified) flang/docs/ImplementingASemanticCheck.md (+2-2) - (modified) flang/docs/Overview.md (+6-6) - (modified) flang/examples/FlangOmpReport/FlangOmpReport.cpp (+1-1) - (modified) flang/lib/FrontendTool/ExecuteCompilerInvocation.cpp (+1-2) - (modified) flang/test/CMakeLists.txt (+1-1) - (modified) flang/test/Driver/compiler_options.f90 (+2-2) - (modified) flang/test/Driver/disable-ext-name-interop.f90 (+1-1) - (modified) flang/test/Driver/driver-help-hidden.f90 (+3-3) - (modified) flang/test/Driver/driver-version.f90 (+2-2) - (modified) flang/test/Driver/escaped-backslash.f90 (+2-2) - (modified) flang/test/Driver/fdefault.f90 (+14-14) - (modified) flang/test/Driver/flarge-sizes.f90 (+10-10) - (modified) flang/test/Driver/frontend-forwarding.f90 (+2-2) - (modified) flang/test/Driver/intrinsic-module-path.f90 (+1-1) - (modified) flang/test/Driver/lto-flags.f90 (+1-1) - (modified) flang/test/Driver/macro-def-undef.F90 (+2-2) - (modified) flang/test/Driver/missing-input.f90 (+7-7) - (modified) flang/test/Driver/multiple-input-files.f90 (+1-1) - (modified) flang/test/Driver/omp-driver-offload.f90 (+26-26) - (modified) flang/test/Driver/predefined-macros-compiler-version.F90 (+2-2) - (modified) flang/test/Driver/std2018-wrong.f90 (+1-1) - (modified) flang/test/Driver/std2018.f90 (+1-1) - (modified) flang/test/Driver/supported-suffices/f03-suffix.f03 (+1-1) - (modified) flang/test/Driver/supported-suffices/f08-suffix.f08 (+1-1) - (modified) flang/test/Driver/use-module-error.f90 (+2-2) - (modified) flang/test/Driver/use-module.f90 (+2-2) - (modified) flang/test/Driver/version-loops.f90 (+9-9) - (modified) flang/test/Lower/Intrinsics/command_argument_count.f90 (+2-2) - (modified) flang/test/Lower/Intrinsics/exit.f90 (+1-1) - (modified) flang/test/Lower/Intrinsics/ieee_is_normal.f90 (+1-1) - (modified) flang/test/Lower/OpenMP/Todo/omp-declarative-allocate.f90 (+1-1) - (modified) flang/test/Lower/OpenMP/Todo/omp-declare-reduction.f90 (+1-1) - (modified) flang/test/Lower/OpenMP/Todo/omp-declare-simd.f90 (+1-1) - (modified) flang/test/lit.cfg.py (+2-2) - (modified) flang/tools/f18/CMakeLists.txt (+3-3) - (modified) flang/tools/flang-driver/CMakeLists.txt (+16-6) - (modified) flang/tools/flang-driver/driver.cpp (+4-3) ``diff diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index 6f5ff81410326..9a161ffd7cfc5 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -1954,7 +1954,7 @@ void Driver::PrintHelp(bool ShowHidden) const { void Driver::PrintVersion(const Compilation , raw_ostream ) const { if (IsFlangMode()) { -OS << getClangToolFullVersion("flang-new") << '\n'; +OS << getClangToolFullVersion("flang") << '\n'; } else { // FIXME: The following handlers should use a callback mechanism, we don't // know what the client would like to do. diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp index ab19166f18c2d..eb5bd8d033bb4 100644 --- a/clang/lib/Driver/ToolChain.cpp +++ b/clang/lib/Driver/ToolChain.cpp @@ -310,6 +310,9 @@ static const DriverSuffix *FindDriverSuffix(StringRef ProgName, size_t ) { {"cl", "--driver-mode=cl"}, {"++", "--driver-mode=g++"}, {"flang", "--driver-mode=flang"}, + // For backwards compatibility, we create a symlink for `flang` called + // `flang-new`. This will be removed in the future. + {"flang-new", "--driver-mode=flang"}, {"clang-dxc", "--driver-mode=dxc"}, }; diff --git a/clang/lib/Driver/ToolChains/Flang.cpp b/clang/lib/Driver/ToolChains/Flang.cpp index 98b337e60e4ff..5683240e8a435 100644 --- a/clang/lib/Driver/ToolChains/Flang.cpp +++ b/clang/lib/Driver/ToolChains/Flang.cpp @@ -739,14 +739,16 @@ void Flang::ConstructJob(Compilation , const JobAction ,