Lunderberg commented on a change in pull request #8178:
URL: https://github.com/apache/tvm/pull/8178#discussion_r645864425



##########
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:
       Sounds good, and I'll keep it as is for now.  Added an item to my todo 
list to update it later, but low priority since the as-is phrasing also works.




-- 
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]


Reply via email to