1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Fixed Mold-search in older systems

This commit is contained in:
OS-of-S
2024-12-26 23:36:42 +07:00
parent 99a8ab795d
commit b9f0e0cfa3

View File

@@ -123,10 +123,16 @@ def configure(env: "SConsEnvironment"):
found_wrapper = True
break
if not found_wrapper:
print_error(
"Couldn't locate mold installation path. Make sure it's installed in /usr or /usr/local."
)
sys.exit(255)
for path in os.environ["PATH"].split(os.pathsep):
if os.path.isfile(path + "/ld.mold"):
env.Append(LINKFLAGS=["-B" + path])
found_wrapper = True
break
if not found_wrapper:
print_error(
"Couldn't locate mold installation path. Make sure it's installed in /usr, /usr/local or in PATH environment variable."
)
sys.exit(255)
else:
env.Append(LINKFLAGS=["-fuse-ld=mold"])
else: