summaryrefslogtreecommitdiff
path: root/lib/Driver/ToolChain.cpp
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2018-10-26 08:33:29 +0000
committerMartin Storsjo <martin@martin.st>2018-10-26 08:33:29 +0000
commit5cdd15159a9a43caabb1f32f8fec497ef66318da (patch)
tree68ba0f4472dd6bd437b3480189beede6f2a229be /lib/Driver/ToolChain.cpp
parent3c79305630e321df60148995920bc52603635c5c (diff)
downloadclang-5cdd15159a9a43caabb1f32f8fec497ef66318da.tar.gz
Revert "Reapply: [Driver] Use forward slashes in most linker arguments"
This reverts commit r345370, as it uncovered even more issues in tests with partial/inconsistent path normalization: http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/13562 http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/886 http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/20994 In particular, these tests seem to have failed: Clang :: CodeGen/thinlto-diagnostic-handler-remarks-with-hotness.ll Clang :: CodeGen/thinlto-multi-module.ll Clang :: Driver/cuda-external-tools.cu Clang :: Driver/cuda-options.cu Clang :: Driver/hip-toolchain-no-rdc.hip Clang :: Driver/hip-toolchain-rdc.hip Clang :: Driver/openmp-offload-gpu.c At least the Driver tests could potentially be fixed by extending the path normalization to even more places, but the issues with the CodeGen tests are still unknown. In addition, a number of other tests seem to have been broken in other clang dependent tools such as clang-tidy and clangd. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@345372 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/ToolChain.cpp')
-rw-r--r--lib/Driver/ToolChain.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/lib/Driver/ToolChain.cpp b/lib/Driver/ToolChain.cpp
index 880a2ec250..1667536c56 100644
--- a/lib/Driver/ToolChain.cpp
+++ b/lib/Driver/ToolChain.cpp
@@ -376,10 +376,9 @@ std::string ToolChain::getCompilerRT(const ArgList &Args, StringRef Component,
for (const auto &LibPath : getLibraryPaths()) {
SmallString<128> P(LibPath);
- llvm::sys::path::append(P,
- Prefix + Twine("clang_rt.") + Component + Suffix);
+ llvm::sys::path::append(P, Prefix + Twine("clang_rt.") + Component + Suffix);
if (getVFS().exists(P))
- return normalizePath(P);
+ return P.str();
}
StringRef Arch = getArchNameForCompilerRTLib(*this, Args);
@@ -387,7 +386,7 @@ std::string ToolChain::getCompilerRT(const ArgList &Args, StringRef Component,
SmallString<128> Path(getCompilerRTPath());
llvm::sys::path::append(Path, Prefix + Twine("clang_rt.") + Component + "-" +
Arch + Env + Suffix);
- return normalizePath(Path);
+ return Path.str();
}
const char *ToolChain::getCompilerRTArgString(const llvm::opt::ArgList &Args,
@@ -426,7 +425,7 @@ Tool *ToolChain::SelectTool(const JobAction &JA) const {
}
std::string ToolChain::GetFilePath(const char *Name) const {
- return normalizePath(D.GetFilePath(Name, *this));
+ return D.GetFilePath(Name, *this);
}
std::string ToolChain::GetProgramPath(const char *Name) const {
@@ -775,14 +774,12 @@ void ToolChain::AddCXXStdlibLibArgs(const ArgList &Args,
void ToolChain::AddFilePathLibArgs(const ArgList &Args,
ArgStringList &CmdArgs) const {
for (const auto &LibPath : getLibraryPaths())
- if (LibPath.length() > 0)
- CmdArgs.push_back(
- Args.MakeArgString(StringRef("-L") + normalizePath(LibPath)));
+ if(LibPath.length() > 0)
+ CmdArgs.push_back(Args.MakeArgString(StringRef("-L") + LibPath));
for (const auto &LibPath : getFilePaths())
- if (LibPath.length() > 0)
- CmdArgs.push_back(
- Args.MakeArgString(StringRef("-L") + normalizePath(LibPath)));
+ if(LibPath.length() > 0)
+ CmdArgs.push_back(Args.MakeArgString(StringRef("-L") + LibPath));
}
void ToolChain::AddCCKextLibArgs(const ArgList &Args,