areusch commented on a change in pull request #8178:
URL: https://github.com/apache/tvm/pull/8178#discussion_r645835949
##########
File path: CMakeLists.txt
##########
@@ -165,6 +169,16 @@ else(MSVC)
set(CMAKE_CXX_FLAGS "-faligned-new ${CMAKE_CXX_FLAGS}")
endif()
+ # ld option to warn if symbols are undefined (e.g. libtvm_runtime.so
+ # using symbols only present in libtvm.so). Not needed for MSVC,
+ # since this is already the default there.
+ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+ set(TVM_NO_UNDEFINED_SYMBOLS "-Wl,-undefined,error")
+ else()
+ set(TVM_NO_UNDEFINED_SYMBOLS "-Wl,--no-undefined")
+ endif()
+ message(STATUS "Forbidding undefined symbols in shared library, using
${TVM_NO_UNDEFINED_SYMBOLS} on platform ${CMAKE_SYSTEM_NAME}")
Review comment:
oh oops, i meant to resolve this first but got trigger happy. i don't
mind that phrasing, but since it applies in all cases, i think it's probably
fine as-is too.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]