Files
llvm-mingw/patches/clang-0002.patch
T
Hugo Beauzée-Luyssen 4808f05671 Add an early arm toolchain
This isn't fully functionnal yet
2016-08-04 16:20:17 +02:00

46 lines
1.6 KiB
Diff

From a6ab1bd3b1a1f1e4eb8b8490dac5f1b5b4b72e6a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo@beauzee.fr>
Date: Mon, 2 May 2016 15:58:31 +0200
Subject: [PATCH] Manually revert 0e2452f3055e2e2cad06a55c5ca9c2be13404781
This re-enables mingw detection
---
lib/Driver/MinGWToolChain.cpp | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/lib/Driver/MinGWToolChain.cpp b/lib/Driver/MinGWToolChain.cpp
index 938440b..a1dc25b 100644
--- a/lib/Driver/MinGWToolChain.cpp
+++ b/lib/Driver/MinGWToolChain.cpp
@@ -66,23 +66,17 @@ MinGW::MinGW(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
: ToolChain(D, Triple, Args) {
getProgramPaths().push_back(getDriver().getInstalledDir());
-// In Windows there aren't any standard install locations, we search
-// for gcc on the PATH. In Linux the base is always /usr.
-#ifdef LLVM_ON_WIN32
+ // On Windows if there is no sysroot we search for gcc on the PATH.
if (getDriver().SysRoot.size())
Base = getDriver().SysRoot;
+#ifdef LLVM_ON_WIN32
else if (llvm::ErrorOr<std::string> GPPName =
llvm::sys::findProgramByName("gcc"))
Base = llvm::sys::path::parent_path(
llvm::sys::path::parent_path(GPPName.get()));
- else
- Base = llvm::sys::path::parent_path(getDriver().getInstalledDir());
-#else
- if (getDriver().SysRoot.size())
- Base = getDriver().SysRoot;
- else
- Base = "/usr";
#endif
+ if (!Base.size())
+ Base = llvm::sys::path::parent_path(getDriver().getInstalledDir());
Base += llvm::sys::path::get_separator();
findGccLibDir();
--
2.8.1