Skip to content

Commit 40a16e7

Browse files
committed
Revert "[flang][driver] rename flang-new to flang (llvm#110023)"
This reverts commit 06eb10d.
1 parent 91883c7 commit 40a16e7

File tree

70 files changed

+228
-249
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+228
-249
lines changed

.github/workflows/release-binaries.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ jobs:
328328
run: |
329329
# Build some of the mlir tools that take a long time to link
330330
if [ "${{ needs.prepare.outputs.build-flang }}" = "true" ]; then
331-
ninja -C ${{ steps.setup-stage.outputs.build-prefix }}/build/tools/clang/stage2-bins/ -j2 flang bbc
331+
ninja -C ${{ steps.setup-stage.outputs.build-prefix }}/build/tools/clang/stage2-bins/ -j2 flang-new bbc
332332
fi
333333
ninja -C ${{ steps.setup-stage.outputs.build-prefix }}/build/tools/clang/stage2-bins/ \
334334
mlir-bytecode-parser-fuzzer \

clang/include/clang/Basic/DiagnosticDriverKinds.td

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,6 @@ def warn_drv_unsupported_option_for_processor : Warning<
147147
def warn_drv_unsupported_openmp_library : Warning<
148148
"the library '%0=%1' is not supported, OpenMP will not be enabled">,
149149
InGroup<OptionIgnored>;
150-
def warn_openmp_experimental : Warning<
151-
"OpenMP support in flang is still experimental">,
152-
InGroup<ExperimentalOption>;
153150

154151
def err_drv_invalid_thread_model_for_target : Error<
155152
"invalid thread model '%0' in '%1' for this target">;

clang/include/clang/Basic/DiagnosticGroups.td

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1583,7 +1583,3 @@ def ExtractAPIMisuse : DiagGroup<"extractapi-misuse">;
15831583
// Warnings about using the non-standard extension having an explicit specialization
15841584
// with a storage class specifier.
15851585
def ExplicitSpecializationStorageClass : DiagGroup<"explicit-specialization-storage-class">;
1586-
1587-
// A warning for options that enable a feature that is not yet complete
1588-
def ExperimentalOption : DiagGroup<"experimental-option">;
1589-

clang/include/clang/Driver/Options.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6077,7 +6077,7 @@ def _sysroot_EQ : Joined<["--"], "sysroot=">, Visibility<[ClangOption, FlangOpti
60776077
def _sysroot : Separate<["--"], "sysroot">, Alias<_sysroot_EQ>;
60786078

60796079
//===----------------------------------------------------------------------===//
6080-
// pie/pic options (clang + flang)
6080+
// pie/pic options (clang + flang-new)
60816081
//===----------------------------------------------------------------------===//
60826082
let Visibility = [ClangOption, FlangOption] in {
60836083

@@ -6093,7 +6093,7 @@ def fno_pie : Flag<["-"], "fno-pie">, Group<f_Group>;
60936093
} // let Vis = [Default, FlangOption]
60946094

60956095
//===----------------------------------------------------------------------===//
6096-
// Target Options (clang + flang)
6096+
// Target Options (clang + flang-new)
60976097
//===----------------------------------------------------------------------===//
60986098
let Flags = [TargetSpecific] in {
60996099
let Visibility = [ClangOption, FlangOption] in {

clang/lib/Driver/Driver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2029,7 +2029,7 @@ void Driver::PrintHelp(bool ShowHidden) const {
20292029

20302030
void Driver::PrintVersion(const Compilation &C, raw_ostream &OS) const {
20312031
if (IsFlangMode()) {
2032-
OS << getClangToolFullVersion("flang") << '\n';
2032+
OS << getClangToolFullVersion("flang-new") << '\n';
20332033
} else {
20342034
// FIXME: The following handlers should use a callback mechanism, we don't
20352035
// know what the client would like to do.

clang/lib/Driver/ToolChain.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -386,9 +386,6 @@ static const DriverSuffix *FindDriverSuffix(StringRef ProgName, size_t &Pos) {
386386
{"cl", "--driver-mode=cl"},
387387
{"++", "--driver-mode=g++"},
388388
{"flang", "--driver-mode=flang"},
389-
// For backwards compatibility, we create a symlink for `flang` called
390-
// `flang-new`. This will be removed in the future.
391-
{"flang-new", "--driver-mode=flang"},
392389
{"clang-dxc", "--driver-mode=dxc"},
393390
};
394391

clang/lib/Driver/ToolChains/Flang.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -788,9 +788,6 @@ void Flang::ConstructJob(Compilation &C, const JobAction &JA,
788788

789789
if (Args.hasArg(options::OPT_fopenmp_force_usm))
790790
CmdArgs.push_back("-fopenmp-force-usm");
791-
// TODO: OpenMP support isn't "done" yet, so for now we warn that it
792-
// is experimental.
793-
D.Diag(diag::warn_openmp_experimental);
794791

795792
// FIXME: Clang supports a whole bunch more flags here.
796793
break;
@@ -885,12 +882,14 @@ void Flang::ConstructJob(Compilation &C, const JobAction &JA,
885882

886883
CmdArgs.push_back(Input.getFilename());
887884

888-
const char *Exec = Args.MakeArgString(D.GetProgramPath("flang", TC));
885+
// TODO: Replace flang-new with flang once the new driver replaces the
886+
// throwaway driver
887+
const char *Exec = Args.MakeArgString(D.GetProgramPath("flang-new", TC));
889888
C.addCommand(std::make_unique<Command>(JA, *this,
890889
ResponseFileSupport::AtFileUTF8(),
891890
Exec, CmdArgs, Inputs, Output));
892891
}
893892

894-
Flang::Flang(const ToolChain &TC) : Tool("flang", "flang frontend", TC) {}
893+
Flang::Flang(const ToolChain &TC) : Tool("flang-new", "flang frontend", TC) {}
895894

896895
Flang::~Flang() {}

clang/test/Driver/flang/flang.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
! * (no type specified, resulting in an object file)
1414

1515
! All invocations should begin with flang -fc1, consume up to here.
16-
! ALL-LABEL: "{{[^"]*}}flang{{[^"/]*}}" "-fc1"
16+
! ALL-LABEL: "{{[^"]*}}flang-new{{[^"/]*}}" "-fc1"
1717

1818
! Check that f90 files are not treated as "previously preprocessed"
1919
! ... in --driver-mode=flang.

clang/test/Driver/flang/flang_ucase.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
! * (no type specified, resulting in an object file)
1414

1515
! All invocations should begin with flang -fc1, consume up to here.
16-
! ALL-LABEL: "{{[^"]*}}flang{{[^"/]*}}" "-fc1"
16+
! ALL-LABEL: "{{[^"]*}}flang-new{{[^"/]*}}" "-fc1"
1717

1818
! Check that f90 files are not treated as "previously preprocessed"
1919
! ... in --driver-mode=flang.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
! Check that flang can handle mixed C and fortran inputs.
22

33
! RUN: %clang --driver-mode=flang -### -fsyntax-only %S/Inputs/one.f90 %S/Inputs/other.c 2>&1 | FileCheck --check-prefixes=CHECK-SYNTAX-ONLY %s
4-
! CHECK-SYNTAX-ONLY-LABEL: "{{[^"]*}}flang{{[^"/]*}}" "-fc1"
4+
! CHECK-SYNTAX-ONLY-LABEL: "{{[^"]*}}flang-new{{[^"/]*}}" "-fc1"
55
! CHECK-SYNTAX-ONLY: "{{[^"]*}}/Inputs/one.f90"
66
! CHECK-SYNTAX-ONLY-LABEL: "{{[^"]*}}clang{{[^"/]*}}" "-cc1"
77
! CHECK-SYNTAX-ONLY: "{{[^"]*}}/Inputs/other.c"

0 commit comments

Comments
 (0)