summaryrefslogtreecommitdiff
path: root/Toolchain/Patches
diff options
context:
space:
mode:
authorDaniel Bertalan <dani@danielbertalan.dev>2021-11-20 16:40:15 +0100
committerBrian Gianforcaro <b.gianfo@gmail.com>2021-11-28 09:38:57 -0800
commitce3b2190211292a704da413501afc9e502c0f148 (patch)
tree9d62c482fda9ee3bcfd07b81a058a1e4465c05b3 /Toolchain/Patches
parentea8335cda14d1dfdaaa2db43af2ace982cc0f378 (diff)
downloadserenity-ce3b2190211292a704da413501afc9e502c0f148.zip
Toolchain/Clang: Allow setting a default unwind library
This will let us use `libgcc` for unwinding when we build the LLVM port with the GNU toolchain.
Diffstat (limited to 'Toolchain/Patches')
-rw-r--r--Toolchain/Patches/llvm.patch7
1 files changed, 4 insertions, 3 deletions
diff --git a/Toolchain/Patches/llvm.patch b/Toolchain/Patches/llvm.patch
index 08034e1dc0..88f73d824d 100644
--- a/Toolchain/Patches/llvm.patch
+++ b/Toolchain/Patches/llvm.patch
@@ -136,10 +136,10 @@ index 58ae08a38..8e9a3fee6 100644
options::OPT_foperator_names, false))
diff --git a/clang/lib/Driver/ToolChains/Serenity.cpp b/clang/lib/Driver/ToolChains/Serenity.cpp
new file mode 100644
-index 000000000..b21be0f9d
+index 000000000..461f55ad3
--- /dev/null
+++ b/clang/lib/Driver/ToolChains/Serenity.cpp
-@@ -0,0 +1,280 @@
+@@ -0,0 +1,281 @@
+//===---- Serenity.cpp - SerenityOS ToolChain Implementation ----*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
@@ -150,6 +150,7 @@ index 000000000..b21be0f9d
+
+#include "Serenity.h"
+#include "CommonArgs.h"
++#include "clang/Config/config.h"
+#include "clang/Driver/Compilation.h"
+#include "clang/Driver/Driver.h"
+#include "clang/Driver/DriverDiagnostic.h"
@@ -396,7 +397,7 @@ index 000000000..b21be0f9d
+Serenity::GetUnwindLibType(const llvm::opt::ArgList &Args) const {
+
+ const Arg *A = Args.getLastArg(options::OPT_unwindlib_EQ);
-+ StringRef LibName = A ? A->getValue() : "";
++ StringRef LibName = A ? A->getValue() : CLANG_DEFAULT_UNWINDLIB;
+
+ if (LibName == "none") {
+ return ToolChain::UNW_None;