forked from OSchip/llvm-project
Revert "[flang] Version information in flang/f18"
Patch breaks out of tree builds and fails its regression test on buildbots. This reverts commit 6e67a74ed73e60a9609f2666e9ac9f44c63c3e0f.
This commit is contained in:
parent
63b5b92bc9
commit
0057532e3f
|
@ -1,10 +1,7 @@
|
|||
! Check that lit configuration works by checking the compiler version
|
||||
|
||||
! RUN: %f18 -V 2>&1 | FileCheck -check-prefix=VERSION %s
|
||||
! VERSION-NOT:{{![[:space:]]}}
|
||||
! VERSION:{{[[:space:]]}}
|
||||
! VERSION-SAME:f18 compiler (under development), version {{[1-9][0-9]*.[0-9]*.[0-9]*}}
|
||||
! VERSION-SAME:f18 compiler (under development)
|
||||
! VERSION-EMPTY:
|
||||
|
||||
! RUN: %f18 -V 2>&1 | FileCheck -check-prefix=VERSION %s
|
||||
! RUN: %f18 -v 2>&1 | FileCheck -check-prefix=VERSION %s
|
||||
! RUN: %f18 --version 2>&1 | FileCheck -check-prefix=VERSION %s
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
! Check that the macros that give the verion number are set properly
|
||||
|
||||
!CHECK: flang_major = {{[1-9][0-9]*$}}
|
||||
!CHECK: flang_minor = {{[0-9]+$}}
|
||||
!CHECK: flang_patchlevel = {{[0-9]+$}}
|
||||
!RUN: %f18 -E %s | FileCheck --ignore-case %s
|
||||
|
||||
|
||||
integer, parameter :: flang_major = __flang_major__
|
||||
integer, parameter :: flang_minor = __flang_minor__
|
||||
integer, parameter :: flang_patchlevel = __flang_patchlevel__
|
||||
|
|
@ -80,6 +80,5 @@ endif()
|
|||
# The flang script to be installed needs a different path to the headers.
|
||||
set(FLANG_INTRINSIC_MODULES_DIR ${CMAKE_INSTALL_PREFIX}/include/flang)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/flang.sh.in ${FLANG_BINARY_DIR}/bin/flang-install.sh @ONLY)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/f18_version.h.in ${CMAKE_CURRENT_BINARY_DIR}/f18_version.h @ONLY)
|
||||
|
||||
install(PROGRAMS ${FLANG_BINARY_DIR}/bin/flang-install.sh DESTINATION bin RENAME flang PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE)
|
||||
|
|
|
@ -38,8 +38,6 @@
|
|||
#include <unistd.h>
|
||||
#include <vector>
|
||||
|
||||
#include "f18_version.h"
|
||||
|
||||
static std::list<std::string> argList(int argc, char *const argv[]) {
|
||||
std::list<std::string> result;
|
||||
for (int j = 0; j < argc; ++j) {
|
||||
|
@ -393,13 +391,6 @@ void Link(std::vector<std::string> &liblist, std::vector<std::string> &objects,
|
|||
}
|
||||
}
|
||||
|
||||
int printVersion() {
|
||||
llvm::errs() << "\nf18 compiler (under development), version "
|
||||
<< __FLANG_MAJOR__ << "." << __FLANG_MINOR__ << "."
|
||||
<< __FLANG_PATCHLEVEL__ << "\n";
|
||||
return exitStatus;
|
||||
}
|
||||
|
||||
int main(int argc, char *const argv[]) {
|
||||
|
||||
atexit(CleanUpAtExit);
|
||||
|
@ -421,11 +412,6 @@ int main(int argc, char *const argv[]) {
|
|||
options.predefinitions.emplace_back("__F18_MAJOR__", "1");
|
||||
options.predefinitions.emplace_back("__F18_MINOR__", "1");
|
||||
options.predefinitions.emplace_back("__F18_PATCHLEVEL__", "1");
|
||||
options.predefinitions.emplace_back("__flang__", __FLANG__);
|
||||
options.predefinitions.emplace_back("__flang_major__", __FLANG_MAJOR__);
|
||||
options.predefinitions.emplace_back("__flang_minor__", __FLANG_MINOR__);
|
||||
options.predefinitions.emplace_back(
|
||||
"__flang_patchlevel__", __FLANG_PATCHLEVEL__);
|
||||
#if __x86_64__
|
||||
options.predefinitions.emplace_back("__x86_64__", "1");
|
||||
#endif
|
||||
|
@ -675,16 +661,13 @@ int main(int argc, char *const argv[]) {
|
|||
<< "Unrecognised options are passed through to the external compiler\n"
|
||||
<< "set by F18_FC (see defaults).\n";
|
||||
return exitStatus;
|
||||
} else if (arg == "-V" || arg == "--version") {
|
||||
return printVersion();
|
||||
} else if (arg == "-V") {
|
||||
llvm::errs() << "\nf18 compiler (under development)\n";
|
||||
return exitStatus;
|
||||
} else {
|
||||
driver.F18_FCArgs.push_back(arg);
|
||||
if (arg == "-v") {
|
||||
if (args.size() > 1) {
|
||||
driver.verbose = true;
|
||||
} else {
|
||||
return printVersion();
|
||||
}
|
||||
driver.verbose = true;
|
||||
} else if (arg == "-I") {
|
||||
driver.F18_FCArgs.push_back(args.front());
|
||||
driver.searchDirectories.push_back(args.front());
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
#ifndef _F18_H_
|
||||
#define _F18_H_
|
||||
|
||||
#define __FLANG__ "1"
|
||||
#define __FLANG_MAJOR__ "@LLVM_VERSION_MAJOR@"
|
||||
#define __FLANG_MINOR__ "@LLVM_VERSION_MINOR@"
|
||||
#define __FLANG_PATCHLEVEL__ "@LLVM_VERSION_PATCH@"
|
||||
|
||||
#endif // _F18_H_
|
Loading…
Reference in New Issue