Skip to content

Commit a09d9d3

Browse files
authored
Merge pull request #376 from isuruf/flat_namespace
dont use flat_namespace as it is evil
2 parents 1ddb1f3 + 91c77c3 commit a09d9d3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

cmake/FindPython.cmake

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,9 @@ macro(ADD_PYTHON_LIBRARY name)
109109
# on Mac, we need to use the "-bundle" gcc flag, which is what MODULE
110110
# does:
111111
add_library(${name} MODULE ${ARGN})
112-
# and "-flat_namespace -undefined suppress" link flags, that we need
113-
# to add by hand:
112+
# and "-undefined dynamic_lookup" link flags, that we need to add by hand:
114113
set_property(TARGET ${name} APPEND_STRING PROPERTY
115-
LINK_FLAGS " -flat_namespace -undefined suppress -Wl,-exported_symbol,_PyInit_${name}")
114+
LINK_FLAGS " -undefined dynamic_lookup -Wl,-exported_symbol,_PyInit_${name}")
116115
ELSEIF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
117116
# on Linux, we need to use the "-shared" gcc flag, which is what SHARED
118117
# does:

0 commit comments

Comments
 (0)