From 3c66820cf375b45b3dd14aa6ade1575b188e385f Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Wed, 25 Sep 2024 17:38:34 +0200 Subject: [PATCH] [SCons] Apply long line fix to windows MSVC --- platform/windows/detect.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/platform/windows/detect.py b/platform/windows/detect.py index 9adab7284c92..b4dcebe06acc 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -392,6 +392,11 @@ def configure_msvc(env: "SConsEnvironment", vcvars_msvc_config): env["MAXLINELENGTH"] = 8192 # Windows Vista and beyond, so always applicable. + # In case the command line to AR (lib) is too long, use a response file. + env["ARCOM_ORIG"] = env["ARCOM"] + env["ARCOM"] = "${TEMPFILE('$ARCOM_ORIG', '$ARCOMSTR')}" + env["TEMPFILESUFFIX"] = ".rsp" + if env["silence_msvc"] and not env.GetOption("clean"): from tempfile import mkstemp