Files
sousa-gecko/third_party/llama.cpp/get-terminate.patch
T
Paul Adenot 4dd522c652 Bug 1971158 - Vendor llama.cpp. r=glandium
This is the result of running `./mach vendor third_party/llama.cpp/moz.yaml
--patch none && ./mach vendor third_party/llama.cpp/moz.yaml
--patch only`. This vendors the CMakeLists.txt files, and parses them,
generating sources.mozbuild. Some custom code runs after that, but things have
been stable for 3 or 4 updates in the last few weeks.

This runs in a separate process (Inference) that has a similar sandbox to a
content process. Only CPU inference is enabled, hardware acceleration will come
at a later stage, and after sandboxing work.

A few patches were needed, most notably to work around the lack of exceptions in
Firefox, and to not use functions from libstdc++ that are too recent.

Differential Revision: https://phabricator.services.mozilla.com/D253058
2025-09-04 01:48:59 +00:00

18 lines
485 B
Diff

diff --git a/ggml/src/ggml.cpp b/ggml/src/ggml.cpp
index 0d388d4553..8354bb0cc8 100644
--- a/ggml/src/ggml.cpp
+++ b/ggml/src/ggml.cpp
@@ -13,6 +13,7 @@
abort(); // unreachable unless previous_terminate_handler was nullptr
}
+#if 0
static bool ggml_uncaught_exception_init = []{
const char * GGML_NO_BACKTRACE = getenv("GGML_NO_BACKTRACE");
if (GGML_NO_BACKTRACE) {
@@ -24,3 +25,4 @@
std::set_terminate(ggml_uncaught_exception);
return true;
}();
+#endif