[llvm] [CMake] update Apple undefined symbol link flag from suppress (PR #116113)
Greg Roth via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 13 14:08:56 PST 2024
https://github.com/pow2clk created https://github.com/llvm/llvm-project/pull/116113
the -undefined suppress option for Apple's linker is deprecated and was producing multiple warnings. This updates it to dynamic_lookup, which has much the same effect, but avoids these deprecation warnings.
>From cb0da0c42f7e28456f96e2c2fb26b2f6911b3f5b Mon Sep 17 00:00:00 2001
From: Greg Roth <grroth at microsoft.com>
Date: Wed, 13 Nov 2024 15:06:09 -0700
Subject: [PATCH] [CMake] update Apple undefined symbol link flag from suppress
the -undefined suppress option for Apple's linker is deprecated and was producing multiple warnings. This updates it to dynamic_lookup, which has much the same effect, but avoids these deprecation warnings.
---
llvm/cmake/modules/HandleLLVMOptions.cmake | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake
index 0112850928fae6..f19125eb6bf273 100644
--- a/llvm/cmake/modules/HandleLLVMOptions.cmake
+++ b/llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -251,7 +251,7 @@ endif()
if(APPLE)
# Darwin-specific linker flags for loadable modules.
- set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,-flat_namespace -Wl,-undefined -Wl,suppress")
+ set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,-flat_namespace -Wl,-undefined -Wl,dynamic_lookup")
endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
More information about the llvm-commits
mailing list