summaryrefslogtreecommitdiffstats
path: root/platform/windows/detect.py
diff options
context:
space:
mode:
authorSpartan322 <Megacake1234@gmail.com>2024-10-14 02:57:59 -0400
committerSpartan322 <Megacake1234@gmail.com>2024-10-14 02:57:59 -0400
commit22d604c80d9ffd7ad72b06458a2e8e72ee5737e3 (patch)
tree176614fa17d6a68691b5f27f8e5f7d9b4dd17729 /platform/windows/detect.py
parent83d65738b06986e5aa0943cae01e357133e04a75 (diff)
parent92e51fca7247c932f95a1662aefc28aca96e8de6 (diff)
downloadredot-engine-22d604c80d9ffd7ad72b06458a2e8e72ee5737e3.tar.gz
Merge commit godotengine@92e51fca7247c932f95a1662aefc28aca96e8de6
Diffstat (limited to 'platform/windows/detect.py')
-rw-r--r--platform/windows/detect.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/platform/windows/detect.py b/platform/windows/detect.py
index 4043f3a8c2..0ee52a09a7 100644
--- a/platform/windows/detect.py
+++ b/platform/windows/detect.py
@@ -662,7 +662,7 @@ def get_ar_version(env):
print_warning("Couldn't check version of `ar`.")
return ret
- match = re.search(r"GNU ar \(GNU Binutils\) (\d+)\.(\d+)(?:\.(\d+))?", output)
+ match = re.search(r"GNU ar(?: \(GNU Binutils\)| version) (\d+)\.(\d+)(?:\.(\d+))?", output)
if match:
ret["major"] = int(match[1])
ret["minor"] = int(match[2])
@@ -788,8 +788,9 @@ def configure_mingw(env: "SConsEnvironment"):
env["CXX"] = mingw_bin_prefix + "g++"
if try_cmd("as --version", env["mingw_prefix"], env["arch"]):
env["AS"] = mingw_bin_prefix + "as"
- if try_cmd("gcc-ar --version", env["mingw_prefix"], env["arch"]):
- env["AR"] = mingw_bin_prefix + "gcc-ar"
+ ar = "ar" if os.name == "nt" else "gcc-ar"
+ if try_cmd(f"{ar} --version", env["mingw_prefix"], env["arch"]):
+ env["AR"] = mingw_bin_prefix + ar
if try_cmd("gcc-ranlib --version", env["mingw_prefix"], env["arch"]):
env["RANLIB"] = mingw_bin_prefix + "gcc-ranlib"