Skip to content

Commit 5b542a3

Browse files
committed
fix(bench-build): fix Mold with GCC
1 parent 2ab4f22 commit 5b542a3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tools/bench-build.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,13 @@ def try_add_cxx_configs(
214214
label=f"{label}{label_suffix} Mold",
215215
cxx_compiler=cxx_compiler,
216216
cxx_flags=f"{cxx_flags} {g}",
217-
link_flags=f"{link_flags} -fuse-ld={MOLD_LINKER_EXE}",
217+
# NOTE(strager): We can't write MOLD_LINKER_EXE here
218+
# because GCC only accepts exactly 'fuse-ld=mold'
219+
# (not a path to mold).
220+
# NOTE(strager): This only works if an executable
221+
# called 'ld.mold' is in PATH. It can't be called
222+
# just 'mold'.
223+
link_flags=f"{link_flags} -fuse-ld=mold",
218224
pch=pch,
219225
)
220226
)

0 commit comments

Comments
 (0)