From 109e394bdefbd6ecda8db67e1b4b844c1a71bd9b Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Sat, 25 Jul 2026 22:03:29 -0700 Subject: [PATCH] Use a temp file for ARCOM to fix command line too long errors --- tools/linux.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/linux.py b/tools/linux.py index 2975c68a6..9834dc976 100644 --- a/tools/linux.py +++ b/tools/linux.py @@ -52,4 +52,11 @@ def generate(env): if env["lto"] == "auto": env["lto"] = "full" + # The generated bindings can produce enough object files to exceed the + # Linux command-line length limit when linking the static library. + # This ARCOM stuff works around that by writing the command to a temporary file. + env["ARCOM_ORIG"] = env["ARCOM"] + # This is SCons lazy evaluation syntax, only switching to a file when the command is actually too long. + env["ARCOM"] = "${TEMPFILE('$ARCOM_ORIG', '$ARCOMSTR')}" + common_compiler_flags.generate(env)