Skip to content

Commit 1e88441

Browse files
authored
[BUILD] Avoid using lld as the linker on macOS (#4827)
LLD is not supported on macOS. This addresses failures like > clang: error: invalid linker name in argument '-fuse-ld=lld' See https://github.com/triton-lang/triton/actions/runs/11099205977/job/30833066194#step:10:61
1 parent 755077c commit 1e88441

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

python/setup.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -429,11 +429,14 @@ def build_extension(self, ext):
429429
cmake_args += [
430430
"-DCMAKE_C_COMPILER=clang",
431431
"-DCMAKE_CXX_COMPILER=clang++",
432-
"-DCMAKE_LINKER=lld",
433-
"-DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=lld",
434-
"-DCMAKE_MODULE_LINKER_FLAGS=-fuse-ld=lld",
435-
"-DCMAKE_SHARED_LINKER_FLAGS=-fuse-ld=lld",
436432
]
433+
if platform.system() != "Darwin":
434+
cmake_args += [
435+
"-DCMAKE_LINKER=lld",
436+
"-DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=lld",
437+
"-DCMAKE_MODULE_LINKER_FLAGS=-fuse-ld=lld",
438+
"-DCMAKE_SHARED_LINKER_FLAGS=-fuse-ld=lld",
439+
]
437440

438441
# Note that asan doesn't work with binaries that use the GPU, so this is
439442
# only useful for tools like triton-opt that don't run code on the GPU.

0 commit comments

Comments
 (0)