From cb5a61d8a1caf235a4852559086895ce841ac292 Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Wed, 2 Oct 2024 17:56:43 +0800 Subject: Update macOS linker flags in GNUmakefile.llvm `-flat_namespace` is effectively deprecated and doesn't really work as expected these days. Omitting the `-flat_namespace` means that binaries are built with a two-level namespace, which don't support `-undefined suppress`. The idiomatic way of telling the linker to look up undefined symbols at runtime is using `-undefined dynamic_lookup`, which is supported by a two-level namespace. See also: ocaml/ocaml#10723 mono/mono#21257 --- GNUmakefile.llvm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'GNUmakefile.llvm') diff --git a/GNUmakefile.llvm b/GNUmakefile.llvm index d5dcb09b..2e806ab8 100644 --- a/GNUmakefile.llvm +++ b/GNUmakefile.llvm @@ -327,7 +327,7 @@ endif # User teor2345 reports that this is required to make things work on MacOS X. ifeq "$(SYS)" "Darwin" - CLANG_LFL += -Wl,-flat_namespace -Wl,-undefined,suppress + CLANG_LFL += -Wl,-undefined,dynamic_lookup override LLVM_HAVE_LTO := 0 override LLVM_LTO := 0 else -- cgit 1.4.1