Files
llvm-mingw/patches/clang-0001.patch
T

50 lines
1.5 KiB
Diff

From 82a145503d9b1aecf8cf45bd7b536543f3342345 Mon Sep 17 00:00:00 2001
From: Martell Malone <martellmalone@gmail.com>
Date: Wed, 16 Dec 2015 02:07:06 -0800
Subject: [PATCH 1/4] mingw-w64: setup new defaults for target
runtime: compiler-rt
c++ lib: libc++
linker: lld
---
lib/Driver/ToolChains.h | 9 +++++++++
lib/Driver/Tools.cpp | 2 +-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/lib/Driver/ToolChains.h b/lib/Driver/ToolChains.h
index 3240357..3be7f25 100644
--- a/lib/Driver/ToolChains.h
+++ b/lib/Driver/ToolChains.h
@@ -714,6 +714,15 @@ public:
void printVerboseInfo(raw_ostream &OS) const override;
+ RuntimeLibType GetDefaultRuntimeLibType() const override {
+ return RuntimeLibType::RLT_CompilerRT;
+ }
+
+ CXXStdlibType
+ GetCXXStdlibType(const llvm::opt::ArgList &Args) const override {
+ return ToolChain::CST_Libcxx;
+ }
+
protected:
Tool *getTool(Action::ActionClass AC) const override;
Tool *buildLinker() const override;
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index 3c3d453..2a9a09d 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -11216,7 +11216,7 @@ void MinGW::Linker::ConstructJob(Compilation &C, const JobAction &JA,
// handled somewhere else.
Args.ClaimAllArgs(options::OPT_w);
- StringRef LinkerName = Args.getLastArgValue(options::OPT_fuse_ld_EQ, "ld");
+ StringRef LinkerName = Args.getLastArgValue(options::OPT_fuse_ld_EQ, "lld");
if (LinkerName.equals_lower("lld")) {
CmdArgs.push_back("-flavor");
CmdArgs.push_back("gnu");
--
2.7.4