Skip to content

Commit 64d4efc

Browse files
committed
Undo the change to override getCompilerRT in AIX.cpp as it alters clang.
1 parent 27496fe commit 64d4efc

File tree

3 files changed

+3
-17
lines changed

3 files changed

+3
-17
lines changed

clang/lib/Driver/ToolChain.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -782,6 +782,9 @@ std::string ToolChain::getCompilerRT(const ArgList &Args, StringRef Component,
782782
Path = P;
783783
}
784784

785+
if (getTriple().isOSAIX())
786+
Path.clear();
787+
785788
// Check the filename for the old layout if the new one does not exist.
786789
CRTBasename = buildCompilerRTBasename(Args, Component, Type,
787790
/*AddArch=*/!IsFortran, IsFortran);

clang/lib/Driver/ToolChains/AIX.cpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#include "llvm/Option/ArgList.h"
1717
#include "llvm/ProfileData/InstrProf.h"
1818
#include "llvm/Support/Path.h"
19-
#include "llvm/Support/VirtualFileSystem.h"
2019

2120
#include <set>
2221

@@ -609,18 +608,6 @@ void AIX::addProfileRTLibs(const llvm::opt::ArgList &Args,
609608
ToolChain::addProfileRTLibs(Args, CmdArgs);
610609
}
611610

612-
std::string AIX::getCompilerRT(const ArgList &Args, StringRef Component,
613-
FileType Type, bool IsFortran) const {
614-
// On AIX, build the filename for the layout as if
615-
// LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF (e.g. lib/${os_dirname})
616-
std::string CRTBasename =
617-
buildCompilerRTBasename(Args, Component, Type,
618-
/*AddArch=*/!IsFortran, IsFortran);
619-
SmallString<128> Path(getCompilerRTPath());
620-
llvm::sys::path::append(Path, CRTBasename);
621-
return std::string(Path);
622-
}
623-
624611
void AIX::addFortranRuntimeLibs(const ArgList &Args,
625612
llvm::opt::ArgStringList &CmdArgs) const {
626613
// Link flang_rt.runtime.a. On AIX, the static and shared library are all

clang/lib/Driver/ToolChains/AIX.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,6 @@ class LLVM_LIBRARY_VISIBILITY AIX : public ToolChain {
8787
void addProfileRTLibs(const llvm::opt::ArgList &Args,
8888
llvm::opt::ArgStringList &CmdArgs) const override;
8989

90-
std::string getCompilerRT(const llvm::opt::ArgList &Args, StringRef Component,
91-
FileType Type = ToolChain::FT_Static,
92-
bool IsFortran = false) const override;
93-
9490
void addFortranRuntimeLibs(const llvm::opt::ArgList &Args,
9591
llvm::opt::ArgStringList &CmdArgs) const override;
9692

0 commit comments

Comments
 (0)