Skip to content

Commit

Permalink
Revert "[Flang] [FlangRT] Introduce FlangRT project as solution to Fl…
Browse files Browse the repository at this point in the history
…ang's runtime LLVM integration"

This reverts commit 6403287.

This is failing on all but 1 of Linaro's flang builders.
CMake Error at /home/tcwg-buildbot/worker/clang-aarch64-full-2stage/llvm/flang-rt/unittests/CMakeLists.txt:37 (message):
  Target llvm_gtest not found.
  • Loading branch information
DavidSpickett committed Oct 2, 2023
1 parent 43198b0 commit ffc67bb
Showing 66 changed files with 245 additions and 1,294 deletions.
40 changes: 14 additions & 26 deletions clang/lib/Driver/ToolChains/CommonArgs.cpp
Original file line number Diff line number Diff line change
@@ -969,41 +969,29 @@ void tools::addFortranRuntimeLibs(const ToolChain &TC,
llvm::opt::ArgStringList &CmdArgs) {
if (TC.getTriple().isKnownWindowsMSVCEnvironment()) {
CmdArgs.push_back("Fortran_main.lib");
CmdArgs.push_back("flang-rt.lib");
CmdArgs.push_back("FortranRuntime.lib");
CmdArgs.push_back("FortranDecimal.lib");
} else {
CmdArgs.push_back("-lFortran_main");
CmdArgs.push_back("-lflang-rt");
CmdArgs.push_back("-lFortranRuntime");
CmdArgs.push_back("-lFortranDecimal");
}
}

void tools::addFortranRuntimeLibraryPath(const ToolChain &TC,
const llvm::opt::ArgList &Args,
ArgStringList &CmdArgs) {
// Default to the <driver-path>/../lib, <driver-path>/../flang-rt/lib, and
// <driver-path>/../runtimes/runtimes-bins/flang-rt/lib directories. This
// works fine on the platforms that we have tested so far. We will probably
// have to re-fine this in the future. In particular, on some platforms, we
// may need to use lib64 instead of lib.
SmallString<256> BuildLibPath =
llvm::sys::path::parent_path(TC.getDriver().Dir);
SmallString<256> FlangRTLibPath =
llvm::sys::path::parent_path(TC.getDriver().Dir);
SmallString<256> RuntimesLibPath =
// Default to the <driver-path>/../lib directory. This works fine on the
// platforms that we have tested so far. We will probably have to re-fine
// this in the future. In particular, on some platforms, we may need to use
// lib64 instead of lib.
SmallString<256> DefaultLibPath =
llvm::sys::path::parent_path(TC.getDriver().Dir);
// Search path for Fortran_main and Flang-rt libraries.
llvm::sys::path::append(BuildLibPath, "lib");
llvm::sys::path::append(FlangRTLibPath, "flang-rt/lib");
llvm::sys::path::append(RuntimesLibPath,
"runtimes/runtimes-bins/flang-rt/lib");
if (TC.getTriple().isKnownWindowsMSVCEnvironment()) {
CmdArgs.push_back(Args.MakeArgString("-libpath:" + BuildLibPath));
CmdArgs.push_back(Args.MakeArgString("-libpath:" + FlangRTLibPath));
CmdArgs.push_back(Args.MakeArgString("-libpath:" + RuntimesLibPath));
} else {
CmdArgs.push_back(Args.MakeArgString("-L" + BuildLibPath));
CmdArgs.push_back(Args.MakeArgString("-L" + FlangRTLibPath));
CmdArgs.push_back(Args.MakeArgString("-L" + RuntimesLibPath));
}
llvm::sys::path::append(DefaultLibPath, "lib");
if (TC.getTriple().isKnownWindowsMSVCEnvironment())
CmdArgs.push_back(Args.MakeArgString("-libpath:" + DefaultLibPath));
else
CmdArgs.push_back(Args.MakeArgString("-L" + DefaultLibPath));
}

static void addSanitizerRuntime(const ToolChain &TC, const ArgList &Args,
148 changes: 0 additions & 148 deletions flang-rt/CMakeLists.txt

This file was deleted.

156 changes: 0 additions & 156 deletions flang-rt/docs/GettingStarted.md

This file was deleted.

Loading

0 comments on commit ffc67bb

Please sign in to comment.