Skip to content

Commit

Permalink
[WIP] Fix for MKL symbol name clashing issue (apache#18855).
Browse files Browse the repository at this point in the history
  • Loading branch information
akarbown committed Sep 28, 2020
1 parent 8e9877b commit 7e5c9b8
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -664,16 +664,11 @@ if(UNIX)
target_compile_options(mxnet PUBLIC "--coverage")
target_link_libraries(mxnet PUBLIC gcov)
endif()
if(CMAKE_BUILD_TYPE STREQUAL "Distribution")
# TODO For handling mxnet's symbols the following can be replace by
# annotating symbol visibility in source code, specifying
# set(CMAKE_CXX_VISIBILITY_PRESET hidden) and
# set(CMAKE_VISIBILITY_INLINES_HIDDEN ON)
# Symbols from statically linked libraries can be discarded via -Wl,--exclude-libs,ALL
if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
if(APPLE)
set_target_properties(mxnet PROPERTIES LINK_FLAGS "-Wl,-exported_symbols_list,${PROJECT_SOURCE_DIR}/cmake/libmxnet.sym")
else()
set_target_properties(mxnet PROPERTIES LINK_FLAGS "-Wl,--version-script=${PROJECT_SOURCE_DIR}/cmake/libmxnet.ver")
set_target_properties(mxnet PROPERTIES LINK_FLAGS "-Wl,--exclude-libs,ALL")
endif()
endif()
elseif(MSVC)
Expand Down

0 comments on commit 7e5c9b8

Please sign in to comment.