mirror of
https://github.com/godotengine/godot.git
synced 2024-09-20 14:32:42 +00:00
Fix using Binutils AR with TEMPFILE on Windows
Set `TEMPFILEARGESCFUNC`[1] to replace backslashes with forward slashes in paths. [1]: https://scons.org/doc/production/HTML/scons-user/apa.html#cv-TEMPFILEARGESCFUNC
This commit is contained in:
parent
694d3c2930
commit
454251660c
|
@ -704,6 +704,17 @@ def get_is_ar_thin_supported(env):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
WINPATHSEP_RE = re.compile(r"\\([^\"'\\]|$)")
|
||||||
|
|
||||||
|
|
||||||
|
def tempfile_arg_esc_func(arg):
|
||||||
|
from SCons.Subst import quote_spaces
|
||||||
|
|
||||||
|
arg = quote_spaces(arg)
|
||||||
|
# GCC requires double Windows slashes, let's use UNIX separator
|
||||||
|
return WINPATHSEP_RE.sub(r"/\1", arg)
|
||||||
|
|
||||||
|
|
||||||
def configure_mingw(env: "SConsEnvironment"):
|
def configure_mingw(env: "SConsEnvironment"):
|
||||||
# Workaround for MinGW. See:
|
# Workaround for MinGW. See:
|
||||||
# https://www.scons.org/wiki/LongCmdLinesOnWin32
|
# https://www.scons.org/wiki/LongCmdLinesOnWin32
|
||||||
|
@ -713,6 +724,8 @@ def configure_mingw(env: "SConsEnvironment"):
|
||||||
env["ARCOM_ORIG"] = env["ARCOM"]
|
env["ARCOM_ORIG"] = env["ARCOM"]
|
||||||
env["ARCOM"] = "${TEMPFILE('$ARCOM_ORIG', '$ARCOMSTR')}"
|
env["ARCOM"] = "${TEMPFILE('$ARCOM_ORIG', '$ARCOMSTR')}"
|
||||||
env["TEMPFILESUFFIX"] = ".rsp"
|
env["TEMPFILESUFFIX"] = ".rsp"
|
||||||
|
if os.name == "nt":
|
||||||
|
env["TEMPFILEARGESCFUNC"] = tempfile_arg_esc_func
|
||||||
|
|
||||||
## Build type
|
## Build type
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user