Skip to content

Commit f7ef444

Browse files
committed
[core] Remove deprecated macOS linker flag(s)
ld: warning: -bind_at_load is deprecated on macOS From $ man ld: Sets a bit in the mach header of the resulting binary which tells dyld to bind all symbols when the binary is loaded, rather than lazily. This contradicts the flags RTLD_LAZY|RTLD_LOCAL passed to dlopen when loading libCling, and is different from the behavior on other platforms that don't have this flag, such as Linux. Also remove the warning suppression that was hiding this deprecation message. It was added as part of commit 5ad4ab9 ("[cmake] Silence macOS linker warnings on -undefined dynamic_lookup:"), which we don't use anymore for libCling since the previous commit.
1 parent ac525d2 commit f7ef444

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

core/metacling/src/CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,7 @@ if(MSVC)
221221
set_property(TARGET Cling APPEND_STRING PROPERTY LINK_FLAGS "${cling_link_str} ${CLAD_LIBS}")
222222
endif()
223223

224-
if(APPLE)
225-
target_link_libraries(Cling PRIVATE -Wl,-w -Wl,-bind_at_load)
226-
elseif(NOT MSVC)
224+
if(NOT APPLE AND NOT MSVC)
227225
# Require the linker to resolve the symbol internally and prevent
228226
# conflicts when linked with another software using also LLVM like in
229227
# the problem reported for Julia in

0 commit comments

Comments
 (0)