Skip to content

Commit 109e394

Browse files
committed
Use a temp file for ARCOM to fix command line too long errors
1 parent 357ad86 commit 109e394

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎tools/linux.py‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,11 @@ def generate(env):
5252
if env["lto"] == "auto":
5353
env["lto"] = "full"
5454

55+
# The generated bindings can produce enough object files to exceed the
56+
# Linux command-line length limit when linking the static library.
57+
# This ARCOM stuff works around that by writing the command to a temporary file.
58+
env["ARCOM_ORIG"] = env["ARCOM"]
59+
# This is SCons lazy evaluation syntax, only switching to a file when the command is actually too long.
60+
env["ARCOM"] = "${TEMPFILE('$ARCOM_ORIG', '$ARCOMSTR')}"
61+
5562
common_compiler_flags.generate(env)

0 commit comments

Comments
 (0)