Skip to content

Commit 28a1b6e

Browse files
Revert "[flang] Version information in flang/f18"
This reverts commit 844f018.
1 parent c2f52e2 commit 28a1b6e

File tree

5 files changed

+6
-48
lines changed

5 files changed

+6
-48
lines changed

flang/test/Driver/version_test.f90

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
! Check that lit configuration works by checking the compiler version
22

3+
! RUN: %f18 -V 2>&1 | FileCheck -check-prefix=VERSION %s
34
! VERSION-NOT:{{![[:space:]]}}
45
! VERSION:{{[[:space:]]}}
5-
! VERSION-SAME:f18 compiler (under development), version {{[1-9][0-9]*.[0-9]*.[0-9]*}}
6+
! VERSION-SAME:f18 compiler (under development)
67
! VERSION-EMPTY:
7-
8-
! RUN: %f18 -V 2>&1 | FileCheck -check-prefix=VERSION %s
9-
! RUN: %f18 -v 2>&1 | FileCheck -check-prefix=VERSION %s
10-
! RUN: %f18 --version 2>&1 | FileCheck -check-prefix=VERSION %s

flang/test/Preprocessing/compiler_defined_macros.F90

Lines changed: 0 additions & 12 deletions
This file was deleted.

flang/tools/f18/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,5 @@ file(COPY ${CMAKE_BINARY_DIR}/tools/flang/bin/flang DESTINATION ${CMAKE_BINARY_D
6464
# The flang script to be installed needs a different path to the headers.
6565
set(FLANG_INTRINSIC_MODULES_DIR ${CMAKE_INSTALL_PREFIX}/include/flang)
6666
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/flang.sh.in ${FLANG_BINARY_DIR}/bin/flang-install.sh @ONLY)
67-
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/f18_version.h.in ${CMAKE_CURRENT_BINARY_DIR}/f18_version.h @ONLY)
6867

6968
install(PROGRAMS ${FLANG_BINARY_DIR}/bin/flang-install.sh DESTINATION bin RENAME flang PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE)

flang/tools/f18/f18.cpp

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@
3838
#include <unistd.h>
3939
#include <vector>
4040

41-
#include "f18_version.h"
42-
4341
static std::list<std::string> argList(int argc, char *const argv[]) {
4442
std::list<std::string> result;
4543
for (int j = 0; j < argc; ++j) {
@@ -392,13 +390,6 @@ void Link(std::vector<std::string> &liblist, std::vector<std::string> &objects,
392390
}
393391
}
394392

395-
int printVersion() {
396-
llvm::errs() << "\nf18 compiler (under development), version "
397-
<< __FLANG_MAJOR__ << "." << __FLANG_MINOR__ << "."
398-
<< __FLANG_PATCHLEVEL__ << "\n";
399-
return exitStatus;
400-
}
401-
402393
int main(int argc, char *const argv[]) {
403394

404395
atexit(CleanUpAtExit);
@@ -420,11 +411,6 @@ int main(int argc, char *const argv[]) {
420411
options.predefinitions.emplace_back("__F18_MAJOR__", "1");
421412
options.predefinitions.emplace_back("__F18_MINOR__", "1");
422413
options.predefinitions.emplace_back("__F18_PATCHLEVEL__", "1");
423-
options.predefinitions.emplace_back("__flang__", __FLANG__);
424-
options.predefinitions.emplace_back("__flang_major__", __FLANG_MAJOR__);
425-
options.predefinitions.emplace_back("__flang_minor__", __FLANG_MINOR__);
426-
options.predefinitions.emplace_back(
427-
"__flang_patchlevel__", __FLANG_PATCHLEVEL__);
428414
#if __x86_64__
429415
options.predefinitions.emplace_back("__x86_64__", "1");
430416
#endif
@@ -665,16 +651,13 @@ int main(int argc, char *const argv[]) {
665651
<< "Unrecognised options are passed through to the external compiler\n"
666652
<< "set by F18_FC (see defaults).\n";
667653
return exitStatus;
668-
} else if (arg == "-V" || arg == "--version") {
669-
return printVersion();
654+
} else if (arg == "-V") {
655+
llvm::errs() << "\nf18 compiler (under development)\n";
656+
return exitStatus;
670657
} else {
671658
driver.F18_FCArgs.push_back(arg);
672659
if (arg == "-v") {
673-
if (args.size() > 1) {
674-
driver.verbose = true;
675-
} else {
676-
return printVersion();
677-
}
660+
driver.verbose = true;
678661
} else if (arg == "-I") {
679662
driver.F18_FCArgs.push_back(args.front());
680663
driver.searchDirectories.push_back(args.front());

flang/tools/f18/f18_version.h.in

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)