From 7305a5c5dd996a2ba34a12ff35a0b2ba59bb6540 Mon Sep 17 00:00:00 2001 From: LoveSy Date: Wed, 3 Jul 2024 21:55:22 +0800 Subject: [PATCH] Fix cross-compile lto on MacOS --- elf/lto-unix.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/elf/lto-unix.cc b/elf/lto-unix.cc index e7c22e71..0769adba 100644 --- a/elf/lto-unix.cc +++ b/elf/lto-unix.cc @@ -569,6 +569,8 @@ template static bool is_llvm(Context &ctx) { #ifdef __MINGW32__ return ctx.arg.plugin.ends_with("LLVMgold.dll"); +#elif __APPLE__ + return ctx.arg.plugin.ends_with("LLVMgold.dylib"); #else return ctx.arg.plugin.ends_with("LLVMgold.so"); #endif