Skip to content

Commit e25bf12

Browse files
committed
probe: macOS links with its own linker
1 parent 2a96029 commit e25bf12

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎.github/probe/o5_link_race.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@
2828
else:
2929
cxx = os.environ.get("CXX", "c++")
3030
subprocess.run([cxx, "-c", "-O0", "-g", "big.cpp", "-o", "big.o"], check=True)
31-
linkers.append(("bfd", lambda out: [cxx, "-fuse-ld=bfd", "big.o", "-o", out]))
31+
if sys.platform == "darwin":
32+
linkers.append(("ld64", lambda out: [cxx, "big.o", "-o", out]))
33+
else:
34+
linkers.append(("bfd", lambda out: [cxx, "-fuse-ld=bfd", "big.o", "-o", out]))
3235
for ld in ("lld", "gold", "mold"):
3336
if subprocess.run([cxx, f"-fuse-ld={ld}", "big.o", "-o", "probe-ld"], capture_output=True).returncode == 0:
3437
linkers.append((ld, lambda out, ld=ld: [cxx, f"-fuse-ld={ld}", "big.o", "-o", out]))

0 commit comments

Comments
 (0)