mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-04 05:20:30 +00:00
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.
This commit is contained in:
parent
ea8335cda1
commit
ce3b219021
Notes:
sideshowbarker
2024-07-18 00:35:14 +09:00
Author: https://github.com/BertalanD Commit: https://github.com/SerenityOS/serenity/commit/ce3b2190211 Pull-request: https://github.com/SerenityOS/serenity/pull/10996 Reviewed-by: https://github.com/timschumi ✅
1 changed files with 4 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue