helloadhavan/github_issues huggingface dataset:
Repository: facebook/react
Pull request: [compiler] Repro for nested function local reassignment issue

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):
* #30111
* __->__ #30110

Summary: Additional repro demonstrating a case that still exists after #30106

Changed files:
filename: compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/todo.invalid-nested-function-reassign-local-variable-in-effect.expect.md
patch: @@ -11,7 +11,7 @@ function Component() {
       local = newValue;
     };
     return reassignLocal;
-  }
+  };
   const reassignLocal = mk_reassignlocal();
   const onMount = (newValue) => {
     reassignLocal("hello");

filename: compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/todo.invalid-nested-function-reassign-local-variable-in-effect.js
patch: @@ -7,7 +7,7 @@ function Component() {
       local = newValue;
     };
     return reassignLocal;
-  }
+  };
   const reassignLocal = mk_reassignlocal();
   const onMount = (newValue) => {
     reassignLocal("hello");
Repository: electron/electron
Pull request: test: strip color output in ESM spec

#### Description of Change

<!--
Thank you for your Pull Request. Please provide a description above and review
the requirements below.

Contributors guide: https://github.com/electron/electron/blob/main/CONTRIBUTING.md
-->

Ran into this when running these tests under VS Code, `FORCE_COLOR` would be set which caused ANSI escape codes to be present in the output and fail the test.  Node.js provides a nice little util for exactly this situation.

#### Checklist
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

- [x] PR description included and stakeholders cc'd
- [x] `npm test` passes

#### Release Notes

Notes: none <!-- Please add a one-line description for app developers to read in the release notes, or 'none' if no notes relevant to app developers. Examples and help on special cases: https://github.com/electron/clerk/blob/main/README.md#examples -->


Changed files:
filename: spec/esm-spec.ts
patch: @@ -7,6 +7,7 @@ import * as fs from 'node:fs';
 import * as os from 'node:os';
 import * as path from 'node:path';
 import { pathToFileURL } from 'node:url';
+import { stripVTControlCharacters } from 'node:util';
 
 const runFixture = async (appPath: string, args: string[] = []) => {
   const result = cp.spawn(process.execPath, [appPath, ...args], {
@@ -27,8 +28,8 @@ const runFixture = async (appPath: string, args: string[] = []) => {
   return {
     code,
     signal,
-    stdout: Buffer.concat(stdout).toString().trim(),
-    stderr: Buffer.concat(stderr).toString().trim()
+    stdout: stripVTControlCharacters(Buffer.concat(stdout).toString().trim()),
+    stderr: stripVTControlCharacters(Buffer.concat(stderr).toString().trim())
   };
 };
Repository: facebook/react
Pull request: [compiler] Add todo fixtures for local reassignment in an async callback

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):
* __->__ #30109
* #30107
* #30106



Changed files:
filename: compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/todo.invalid-reassign-local-variable-in-async-callback.expect.md
patch: @@ -0,0 +1,58 @@
+
+## Input
+
+```javascript
+function Component() {
+  let value = null;
+  const reassign = async () => {
+    await foo().then((result) => {
+      // Reassigning a local variable in an async function is *always* mutating
+      // after render, so this should error regardless of where this ends up
+      // getting called
+      value = result;
+    });
+  };
+
+  const onClick = async () => {
+    await reassign();
+  };
+  return <div onClick={onClick}>Click</div>;
+}
+
+```
+
+## Code
+
+```javascript
+import { c as _c } from "react/compiler-runtime";
+function Component() {
+  const $ = _c(2);
+  let value;
+  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
+    value = null;
+    $[0] = value;
+  } else {
+    value = $[0];
+  }
+  let t0;
+  if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
+    const reassign = async () => {
+      await foo().then((result) => {
+        value = result;
+      });
+    };
+
+    const onClick = async () => {
+      await reassign();
+    };
+
+    t0 = <div onClick={onClick}>Click</div>;
+    $[1] = t0;
+  } else {
+    t0 = $[1];
+  }
+  return t0;
+}
+
+```
+      
\ No newline at end of file

filename: compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/todo.invalid-reassign-local-variable-in-async-callback.js
patch: @@ -0,0 +1,16 @@
+function Component() {
+  let value = null;
+  const reassign = async () => {
+    await foo().then((result) => {
+      // Reassigning a local variable in an async function is *always* mutating
+      // after render, so this should error regardless of where this ends up
+      // getting called
+      value = result;
+    });
+  };
+
+  const onClick = async () => {
+    await reassign();
+  };
+  return <div onClick={onClick}>Click</div>;
+}

filename: compiler/packages/snap/src/SproutTodoFilter.ts
patch: @@ -487,6 +487,7 @@ const skipFilter = new Set([
   "todo.invalid-reassign-local-variable-in-jsx-callback",
   "todo.invalid-reassign-local-variable-in-hook-argument",
   "todo.invalid-reassign-local-variable-in-effect",
+  "todo.invalid-reassign-local-variable-in-async-callback",
 
   // bugs
   "bug-invalid-hoisting-functionexpr",
Repository: nodejs/node
Pull request: doc: add loong64 info into platform list


Changed files:
filename: BUILDING.md
patch: @@ -110,6 +110,7 @@ platforms. This is true regardless of entries in the table below.
 | GNU/Linux        | armv6            | kernel >= 4.14, glibc >= 2.24     | Experimental                                    | Downgraded as of Node.js 12          |
 | GNU/Linux        | ppc64le >=power8 | kernel >= 4.18[^1], glibc >= 2.28 | Tier 2                                          | e.g. Ubuntu 20.04, RHEL 8            |
 | GNU/Linux        | s390x            | kernel >= 4.18[^1], glibc >= 2.28 | Tier 2                                          | e.g. RHEL 8                          |
+| GNU/Linux        | loong64          | kernel >= 5.19, glibc >= 2.36     | Experimental                                    |                                      |
 | Windows          | x64, x86 (WoW64) | >= Windows 10/Server 2016         | Tier 1                                          | [^2],[^3]                            |
 | Windows          | x86 (native)     | >= Windows 10/Server 2016         | Tier 1 (running) / Experimental (compiling)[^4] |                                      |
 | Windows          | x64, x86         | Windows 8.1/Server 2012           | Experimental                                    |                                      |
Repository: ggml-org/llama.cpp
Pull request: codeowners : remove ericcurtin

Taking a break from llama.cpp . I wasn't around at the start of llama.cpp but I want to thank @ggerganov and @slaren for creating a neat community here.



Changed files:
filename: CODEOWNERS
patch: @@ -7,7 +7,7 @@
 /ci/                                    @ggerganov
 /cmake/                                 @ggerganov
 /common/CMakeLists.txt                  @ggerganov
-/common/arg.*                           @ggerganov @ericcurtin
+/common/arg.*                           @ggerganov
 /common/base64.hpp.*                    @ggerganov
 /common/build-info.*                    @ggerganov
 /common/common.*                        @ggerganov
@@ -87,8 +87,7 @@
 /tools/perplexity/                      @ggerganov
 /tools/quantize/                        @ggerganov
 /tools/rpc/                             @rgerganov
-/tools/run/                             @ericcurtin
-/tools/server/*                         @ngxson @ggerganov @ericcurtin # no subdir
+/tools/server/*                         @ngxson @ggerganov # no subdir
 /tools/server/webui/                    @allozaur
 /tools/tokenize/                        @ggerganov
 /tools/tts/                             @ggerganov
Repository: ollama/ollama
Pull request: Update Web UI link to new project name

Ollama WebUI is now known as Open WebUI:

https://openwebui.com

https://github.com/open-webui/open-webui

Changed files:
filename: README.md
patch: @@ -262,7 +262,7 @@ See the [API documentation](./docs/api.md) for all endpoints.
 - [Chatbot UI](https://github.com/ivanfioravanti/chatbot-ollama)
 - [Typescript UI](https://github.com/ollama-interface/Ollama-Gui?tab=readme-ov-file)
 - [Minimalistic React UI for Ollama Models](https://github.com/richawo/minimal-llm-ui)
-- [Web UI](https://github.com/ollama-webui/ollama-webui)
+- [Open WebUI](https://github.com/open-webui/open-webui)
 - [Ollamac](https://github.com/kevinhermawan/Ollamac)
 - [big-AGI](https://github.com/enricoros/big-agi/blob/main/docs/config-ollama.md)
 - [Cheshire Cat assistant framework](https://github.com/cheshire-cat-ai/core)
Repository: huggingface/transformers
Pull request: Update team member list for some CI workflows

# What does this PR do?

Update team member list for some CI workflows

Changed files:
filename: .github/workflows/pr_build_doc_with_comment.yml
patch: @@ -14,7 +14,7 @@ permissions: {}
 jobs:
   get-pr-number:
     name: Get PR number
-    if: ${{ github.event.issue.state == 'open' && contains(fromJSON('["ydshieh", "ArthurZucker", "zucchini-nlp", "qubvel", "molbap", "gante", "LysandreJik", "Cyrilvallez", "Rocketknight1", "SunMarc", "muellerzr", "eustlb", "MekkCyber", "manueldeprada", "vasqu", "ivarflakstad", "stevhliu", "ebezzam"]'), github.actor) && (startsWith(github.event.comment.body, 'build-doc')) }}
+    if: ${{ github.event.issue.state == 'open' && contains(fromJSON('["ydshieh", "ArthurZucker", "zucchini-nlp", "molbap", "gante", "LysandreJik", "Cyrilvallez", "Rocketknight1", "SunMarc", "muellerzr", "eustlb", "MekkCyber", "manueldeprada", "vasqu", "ivarflakstad", "stevhliu", "ebezzam", "itazap"]'), github.actor) && (startsWith(github.event.comment.body, 'build-doc')) }}
     uses: ./.github/workflows/get-pr-number.yml
 
   get-pr-info:

filename: .github/workflows/self-comment-ci.yml
patch: @@ -29,7 +29,7 @@ jobs:
     runs-on: ubuntu-22.04
     name: Get PR number
     # For security: only allow team members to run
-    if: ${{ github.event.issue.state == 'open' && contains(fromJSON('["ydshieh", "ArthurZucker", "zucchini-nlp", "qubvel", "molbap", "gante", "LysandreJik", "Cyrilvallez", "Rocketknight1", "SunMarc", "muellerzr", "eustlb", "MekkCyber", "manueldeprada", "vasqu", "ivarflakstad", "stevhliu", "ebezzam", "remi-or"]'), github.actor) && (startsWith(github.event.comment.body, 'run-slow') || startsWith(github.event.comment.body, 'run slow') || startsWith(github.event.comment.body, 'run_slow')) }}
+    if: ${{ github.event.issue.state == 'open' && contains(fromJSON('["ydshieh", "ArthurZucker", "zucchini-nlp", "molbap", "gante", "LysandreJik", "Cyrilvallez", "Rocketknight1", "SunMarc", "muellerzr", "eustlb", "MekkCyber", "manueldeprada", "vasqu", "ivarflakstad", "stevhliu", "ebezzam", "remi-or", "itazap"]'), github.actor) && (startsWith(github.event.comment.body, 'run-slow') || startsWith(github.event.comment.body, 'run slow') || startsWith(github.event.comment.body, 'run_slow')) }}
     outputs:
       PR_NUMBER: ${{ steps.set_pr_number.outputs.PR_NUMBER }}
     steps:

filename: utils/process_bad_commit_report.py
patch: @@ -34,16 +34,24 @@
 
     # TODO: extend
     team_members = [
-        "ydshieh",
-        "zucchini-nlp",
         "ArthurZucker",
-        "gante",
+        "Cyrilvallez",
         "LysandreJik",
-        "molbap",
-        "qubvel",
+        "MekkCyber",
         "Rocketknight1",
-        "muellerzr",
         "SunMarc",
+        "ebezzam",
+        "eustlb",
+        "gante",
+        "itazap",
+        "ivarflakstad",
+        "molbap",
+        "muellerzr",
+        "remi-or",
+        "stevhliu",
+        "vasqu",
+        "ydshieh",
+        "zucchini-nlp",
     ]
 
     # Counting the number of failures grouped by authors
Repository: nodejs/node
Pull request: doc: add loong64 to list of architectures


Changed files:
filename: doc/api/os.md
patch: @@ -50,8 +50,9 @@ added: v0.5.0
 * Returns: {string}
 
 Returns the operating system CPU architecture for which the Node.js binary was
-compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'mips'`,
-`'mipsel'`, `'ppc'`, `'ppc64'`, `'riscv64'`, `'s390'`, `'s390x'`, and `'x64'`.
+compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`,
+`'mips'`, `'mipsel'`, `'ppc'`, `'ppc64'`, `'riscv64'`, `'s390'`, `'s390x'`,
+and `'x64'`.
 
 The return value is equivalent to [`process.arch`][].
 

filename: doc/api/process.md
patch: @@ -873,8 +873,8 @@ added: v0.5.0
 * {string}
 
 The operating system CPU architecture for which the Node.js binary was compiled.
-Possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'mips'`,`'mipsel'`, `'ppc'`,
-`'ppc64'`, `'riscv64'`, `'s390'`, `'s390x'`, and `'x64'`.
+Possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`, `'mips'`,
+`'mipsel'`, `'ppc'`, `'ppc64'`, `'riscv64'`, `'s390'`, `'s390x'`, and `'x64'`.
 
 ```mjs
 import { arch } from 'node:process';
Repository: ggml-org/llama.cpp
Pull request: llama : fix signed comparison warning on FreeBSD

This ensures correct RLIM_INFINITY handling and compatibility on all platforms (32/64-bit).

    warning: comparison of integers of different signs: 'rlim_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Wsign-compare]
      488 |         if (suggest && (lock_limit.rlim_max > lock_limit.rlim_cur + size)) {
          |                         ~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~


Changed files:
filename: src/llama-mmap.cpp
patch: @@ -485,7 +485,7 @@ struct llama_mlock::impl {
         if (suggest && getrlimit(RLIMIT_MEMLOCK, &lock_limit)) {
             suggest = false;
         }
-        if (suggest && (lock_limit.rlim_max > lock_limit.rlim_cur + size)) {
+        if (suggest && ((uint64_t)lock_limit.rlim_max > (uint64_t)lock_limit.rlim_cur + size)) {
             suggest = false;
         }
 #endif
Repository: electron/electron
Pull request: build: update_depot_tools on initial install

Backport of #47160

See that PR for details.


Notes: <!-- Please add a one-line description for app developers to read in the release notes, or 'none' if no notes relevant to app developers. Examples and help on special cases: https://github.com/electron/clerk/blob/main/README.md#examples -->none


Changed files:
filename: .github/actions/install-build-tools/action.yml
patch: @@ -15,6 +15,7 @@ runs:
       fi
       export BUILD_TOOLS_SHA=6e8526315ea3b4828882497e532b8340e64e053c
       npm i -g @electron/build-tools
+      e d update_depot_tools
       e auto-update disable
       e d auto-update disable
       if [ "$(expr substr $(uname -s) 1 10)" == "MSYS_NT-10" ]; then
Repository: denoland/deno
Pull request: fix: graceful server shutdown with open, un-upgraded connections

Connections that are open but have not yet received a request (and thus
have not been upgraded to HTTP/1 or HTTP/2 and handed off to Hyper),
will now be closed gracefully when the server is shut down instead of
preventing shutdown indefinitely.

<!--
Before submitting a PR, please read https://docs.deno.com/runtime/manual/references/contributing

1. Give the PR a descriptive title.

  Examples of good title:
    - fix(std/http): Fix race condition in server
    - docs(console): Update docstrings
    - feat(doc): Handle nested reexports

  Examples of bad title:
    - fix #7123
    - update docs
    - fix bugs

2. Ensure there is a related issue and it is referenced in the PR text.
3. Ensure there are tests that cover the changes.
4. Ensure `cargo test` passes.
5. Ensure `./tools/format.js` passes without changing files.
6. Ensure `./tools/lint.js` passes.
7. Open as a draft PR if your work is still in progress. The CI won't run
   all steps, but you can add '[ci]' to a commit message to force it to.
8. If you would like to run the benchmarks on the CI, add the 'ci-bench' label.
-->


Changed files:
filename: ext/http/http_next.rs
patch: @@ -874,7 +874,8 @@ async fn serve_http2_autodetect(
   options: Options,
 ) -> Result<(), HttpNextError> {
   let prefix = NetworkStreamPrefixCheck::new(io, HTTP2_PREFIX);
-  let (matches, io) = prefix.match_prefix().await?;
+  let (matches, io) =
+    prefix.match_prefix().try_or_cancel(cancel.clone()).await?;
   if matches {
     serve_http2_unconditional(io, svc, cancel, options.http2_builder_hook)
       .await

filename: tests/unit/serve_test.ts
patch: @@ -4343,6 +4343,27 @@ Deno.test({
   await server.shutdown();
 });
 
+Deno.test({
+  name: "support shutdown while open idle connection exists",
+}, async () => {
+  const { promise, resolve } = Promise.withResolvers<void>();
+
+  await using server = Deno.serve({
+    hostname: "0.0.0.0",
+    port: servePort,
+    onListen: () => resolve(),
+  }, () => new Response("Ok"));
+
+  await promise;
+
+  using conn = await Deno.connect({ port: servePort });
+
+  await server.shutdown();
+
+  const read = await conn.read(new Uint8Array(10));
+  assertEquals(read, null);
+});
+
 // https://github.com/denoland/deno/issues/27083
 Deno.test(
   { permissions: { net: true } },
Repository: facebook/react
Pull request: compiler: fix the `hookKind` for `useInsertionEffect`

Currently, the `hookKind` for `useInsertionEffect` is set to `useLayoutEffect`. This pull request fixes it by adding a new `hookKind` for `useInsertionEffect`.

Changed files:
filename: compiler/packages/babel-plugin-react-compiler/src/HIR/Globals.ts
patch: @@ -363,7 +363,7 @@ const REACT_APIS: Array<[string, BuiltInType]> = [
         restParam: Effect.Freeze,
         returnType: { kind: "Poly" },
         calleeEffect: Effect.Read,
-        hookKind: "useLayoutEffect",
+        hookKind: "useInsertionEffect",
         returnValueKind: ValueKind.Frozen,
       },
       BuiltInUseInsertionEffectHookId

filename: compiler/packages/babel-plugin-react-compiler/src/HIR/ObjectShape.ts
patch: @@ -123,6 +123,7 @@ export type HookKind =
   | "useRef"
   | "useEffect"
   | "useLayoutEffect"
+  | "useInsertionEffect"
   | "useMemo"
   | "useCallback"
   | "Custom";
Repository: ollama/ollama
Pull request: Harden AMD driver lookup logic

It looks like the version file doesn't exist on older(?) drivers

Fixes #2502 

Changed files:
filename: gpu/amd.go
patch: @@ -2,6 +2,7 @@ package gpu
 
 import (
 	"bufio"
+	"errors"
 	"fmt"
 	"io"
 	"log/slog"
@@ -24,14 +25,23 @@ const (
 )
 
 func AMDDetected() bool {
-	_, err := AMDDriverVersion()
-	return err == nil
+	// Some driver versions (older?) don't have a version file, so just lookup the parent dir
+	sysfsDir := filepath.Dir(DriverVersionFile)
+	_, err := os.Stat(sysfsDir)
+	if errors.Is(err, os.ErrNotExist) {
+		slog.Debug("amd driver not detected " + sysfsDir)
+		return false
+	} else if err != nil {
+		slog.Debug(fmt.Sprintf("error looking up amd driver %s %s", sysfsDir, err))
+		return false
+	}
+	return true
 }
 
 func AMDDriverVersion() (string, error) {
 	_, err := os.Stat(DriverVersionFile)
 	if err != nil {
-		return "", err
+		return "", fmt.Errorf("amdgpu file stat error: %s %w", DriverVersionFile, err)
 	}
 	fp, err := os.Open(DriverVersionFile)
 	if err != nil {

filename: gpu/gpu.go
patch: @@ -153,6 +153,9 @@ func GetGPUInfo() GpuInfo {
 		ver, err := AMDDriverVersion()
 		if err == nil {
 			slog.Info("AMD Driver: " + ver)
+		} else {
+			// For now this is benign, but we may eventually need to fail compatibility checks
+			slog.Debug("error looking up amd driver version: %s", err)
 		}
 		gfx := AMDGFXVersions()
 		tooOld := false
Repository: ggml-org/llama.cpp
Pull request: server: explicitly set exec path when create new instance

Trying to fix https://github.com/ggml-org/llama.cpp/issues/16487#issuecomment-3598932331

In some cases, the first argument from the parent process doesn't reflect the binary path. So, we always resolve the binary path manually to make sure that it works.

Changed files:
filename: tools/server/server-models.cpp
patch: @@ -24,8 +24,55 @@
 #include <unistd.h>
 #endif
 
+#if defined(__APPLE__) && defined(__MACH__)
+// macOS: use _NSGetExecutablePath to get the executable path
+#include <mach-o/dyld.h>
+#include <limits.h>
+#endif
+
 #define CMD_EXIT "exit"
 
+static std::filesystem::path get_server_exec_path() {
+#if defined(_WIN32)
+    wchar_t buf[32768] = { 0 };  // Large buffer to handle long paths
+    DWORD len = GetModuleFileNameW(nullptr, buf, _countof(buf));
+    if (len == 0 || len >= _countof(buf)) {
+        throw std::runtime_error("GetModuleFileNameW failed or path too long");
+    }
+    return std::filesystem::path(buf);
+#elif defined(__APPLE__) && defined(__MACH__)
+    char small_path[PATH_MAX];
+    uint32_t size = sizeof(small_path);
+
+    if (_NSGetExecutablePath(small_path, &size) == 0) {
+        // resolve any symlinks to get absolute path
+        try {
+            return std::filesystem::canonical(std::filesystem::path(small_path));
+        } catch (...) {
+            return std::filesystem::path(small_path);
+        }
+    } else {
+        // buffer was too small, allocate required size and call again
+        std::vector<char> buf(size);
+        if (_NSGetExecutablePath(buf.data(), &size) == 0) {
+            try {
+                return std::filesystem::canonical(std::filesystem::path(buf.data()));
+            } catch (...) {
+                return std::filesystem::path(buf.data());
+            }
+        }
+        throw std::runtime_error("_NSGetExecutablePath failed after buffer resize");
+    }
+#else
+    char path[FILENAME_MAX];
+    ssize_t count = readlink("/proc/self/exe", path, FILENAME_MAX);
+    if (count <= 0) {
+        throw std::runtime_error("failed to resolve /proc/self/exe");
+    }
+    return std::filesystem::path(std::string(path, count));
+#endif
+}
+
 struct local_model {
     std::string name;
     std::string path;
@@ -99,6 +146,14 @@ server_models::server_models(
     for (char ** env = envp; *env != nullptr; env++) {
         base_env.push_back(std::string(*env));
     }
+    GGML_ASSERT(!base_args.empty());
+    // set binary path
+    try {
+        base_args[0] = get_server_exec_path().string();
+    } catch (const std::exception & e) {
+        LOG_WRN("failed to get server executable path: %s\n", e.what());
+        LOG_WRN("using original argv[0] as fallback: %s\n", base_args[0].c_str());
+    }
     // TODO: allow refreshing cached model list
     // add cached models
     auto cached_models = common_list_cached_models();
Repository: nodejs/node
Pull request: test: fix timeout of test-cpu-prof-dir-worker.js in LoongArch devices

fix timeout of test-cpu-prof-dir-worker.js in LoongArch devices

Changed files:
filename: tools/test.py
patch: @@ -915,6 +915,7 @@ def GetTestStatus(self, context, sections, defs):
 TIMEOUT_SCALEFACTOR = {
     'arm'       : { 'debug' :  8, 'release' : 3 }, # The ARM buildbots are slow.
     'riscv64'   : { 'debug' :  8, 'release' : 3 }, # The riscv devices are slow.
+    'loong64'   : { 'debug' :  4, 'release' : 1 },
     'ia32'      : { 'debug' :  4, 'release' : 1 },
     'ppc'       : { 'debug' :  4, 'release' : 1 },
     's390'      : { 'debug' :  4, 'release' : 1 } }

filename: tools/utils.py
patch: @@ -99,6 +99,8 @@ def GuessArchitecture():
     return 's390'
   elif id == 'riscv64':
     return 'riscv64'
+  elif id == 'loong64':
+    return 'loong64'
   else:
     id = platform.processor()
     if id == 'powerpc':