Skip to content

Commit 5d180cc

Browse files
committed
fix build warning
ld: warning: -undefined error is deprecated porting missing code line in ClickHouse/ClickHouse#37169
1 parent 4363ee8 commit 5d180cc

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ if (OS_DARWIN)
192192
# from a _specific_ library, which is what we need.
193193
set(WHOLE_ARCHIVE -force_load)
194194
# The `-noall_load` flag is the default and now obsolete.
195-
set(NO_WHOLE_ARCHIVE "-undefined,error") # Effectively, a no-op. Here to avoid empty "-Wl, " sequence to be generated in the command line.
195+
set(NO_WHOLE_ARCHIVE "-undefined,dynamic_lookup") # Effectively, a no-op. Here to avoid empty "-Wl, " sequence to be generated in the command line.
196196
else ()
197197
set(WHOLE_ARCHIVE --whole-archive)
198198
set(NO_WHOLE_ARCHIVE --no-whole-archive)
@@ -410,7 +410,7 @@ endif ()
410410

411411
# Make this extra-checks for correct library dependencies.
412412
if (OS_LINUX AND NOT SANITIZE)
413-
target_link_options(global-group INTERFACE "-Wl,--no-undefined")
413+
target_link_options(global-group INTERFACE "LINKER:--no-undefined")
414414
endif ()
415415

416416
######################################

src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ else()
306306
list (APPEND all_modules dbms)
307307
# force all split libs to be linked
308308
if (OS_DARWIN)
309-
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-undefined,error")
309+
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-undefined,dynamic_lookup")
310310
else()
311311
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-as-needed")
312312
endif()

0 commit comments

Comments
 (0)