Skip to content

Commit

Permalink
Revert "[cmake] Xcode 14 warns about -undefined dynamic_lookup; sim…
Browse files Browse the repository at this point in the history
…ply suppress:"

See #11937
for why `-flat_namespace` is bad.

This reverts commit a05d4be.
  • Loading branch information
Axel-Naumann committed Jan 19, 2023
1 parent aeb5eee commit 0e03b6a
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bindings/jupyroot/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ foreach(val RANGE ${how_many_pythons})
set_target_properties(${libname} PROPERTIES SUFFIX ".pyd")
target_link_libraries(${libname} PUBLIC Core ${python_library})
elseif(APPLE)
target_link_libraries(${libname} PUBLIC -Wl,-bind_at_load -Wl,-flat_namespace -Wl,-undefined -Wl,suppress Core)
target_link_libraries(${libname} PUBLIC -Wl,-bind_at_load -Wl,-undefined -Wl,dynamic_lookup Core)
else()
target_link_libraries(${libname} PUBLIC -Wl,--unresolved-symbols=ignore-all Core)
endif()
Expand Down
2 changes: 1 addition & 1 deletion bindings/pyroot/cppyy/CPyCppyy/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ foreach(val RANGE ${how_many_pythons})
set_target_properties(${libname} PROPERTIES PREFIX "lib")
set_target_properties(${libname} PROPERTIES SUFFIX ".pyd")
elseif(APPLE)
target_link_libraries(${libname} PUBLIC -Wl,-bind_at_load -Wl,-flat_namespace -Wl,-undefined -Wl,suppress cppyy_backend${python_under_version_string})
target_link_libraries(${libname} PUBLIC -Wl,-bind_at_load -Wl,-undefined -Wl,dynamic_lookup cppyy_backend${python_under_version_string})
else()
target_link_libraries(${libname} PUBLIC -Wl,--unresolved-symbols=ignore-all cppyy_backend${python_under_version_string})
endif()
Expand Down
2 changes: 1 addition & 1 deletion bindings/pyroot/pythonizations/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ foreach(val RANGE ${how_many_pythons})
set_target_properties(${libname} PROPERTIES SUFFIX ".pyd")
target_link_libraries(${libname} PUBLIC Core Tree cppyy${python_under_version_string})
elseif(APPLE)
target_link_libraries(${libname} PUBLIC -Wl,-bind_at_load -Wl,-flat_namespace -Wl,-undefined -Wl,suppress Core Tree cppyy${python_under_version_string})
target_link_libraries(${libname} PUBLIC -Wl,-bind_at_load -Wl,-undefined -Wl,dynamic_lookup Core Tree cppyy${python_under_version_string})
else()
target_link_libraries(${libname} PUBLIC -Wl,--unresolved-symbols=ignore-all Core Tree cppyy${python_under_version_string})
endif()
Expand Down
2 changes: 1 addition & 1 deletion core/metacling/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ if(MSVC)
endif()

if(APPLE)
target_link_libraries(Cling PUBLIC -Wl,-bind_at_load -Wl,-flat_namespace -Wl,-undefined -Wl,suppress)
target_link_libraries(Cling PUBLIC -Wl,-bind_at_load -Wl,-undefined -Wl,dynamic_lookup)
elseif(NOT MSVC)
target_link_libraries(Cling PUBLIC -Wl,--unresolved-symbols=ignore-in-object-files)
endif()
2 changes: 1 addition & 1 deletion interpreter/cling/tools/plugins/example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ endif()

set_target_properties(clingDemoPlugin PROPERTIES LIBRARY_OUTPUT_DIRECTORY ".")
if(APPLE)
target_link_libraries(clingDemoPlugin PUBLIC -Wl,-bind_at_load -Wl,-flat_namespace -Wl,-undefined -Wl,suppress)
target_link_libraries(clingDemoPlugin PUBLIC -Wl,-bind_at_load -Wl,-undefined -Wl,dynamic_lookup)
elseif(NOT MSVC)
target_link_libraries(clingDemoPlugin PUBLIC -Wl,--unresolved-symbols=ignore-in-object-files)
endif()
Expand Down
2 changes: 1 addition & 1 deletion montecarlo/pythia6/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ if(pythia6_nolink)
if(CMAKE_SYSTEM_NAME STREQUAL Linux)
string(REGEX REPLACE "-Wl,--no-undefined" "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
elseif(CMAKE_SYSTEM_NAME STREQUAL Darwin)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -flat_namespace -undefined suppress")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -undefined dynamic_lookup")
endif()
else()
if(MSVC)
Expand Down

0 comments on commit 0e03b6a

Please sign in to comment.