summaryrefslogtreecommitdiffstats
path: root/platform/windows/detect.py
diff options
context:
space:
mode:
Diffstat (limited to 'platform/windows/detect.py')
-rw-r--r--platform/windows/detect.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/platform/windows/detect.py b/platform/windows/detect.py
index 684a7c34a0..2db58172bf 100644
--- a/platform/windows/detect.py
+++ b/platform/windows/detect.py
@@ -709,6 +709,11 @@ def configure_mingw(env: "SConsEnvironment"):
# https://www.scons.org/wiki/LongCmdLinesOnWin32
env.use_windows_spawn_fix()
+ # In case the command line to AR is too long, use a response file.
+ env["ARCOM_ORIG"] = env["ARCOM"]
+ env["ARCOM"] = "${TEMPFILE('$ARCOM_ORIG', '$ARCOMSTR')}"
+ env["TEMPFILESUFFIX"] = ".rsp"
+
## Build type
if not env["use_llvm"] and not try_cmd("gcc --version", env["mingw_prefix"], env["arch"]):