You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/05/17 21:31:23 UTC

[GitHub] [tvm] kparzysz-quic commented on a change in pull request #8059: Add flag to build static version of TVM runtime

kparzysz-quic commented on a change in pull request #8059:
URL: https://github.com/apache/tvm/pull/8059#discussion_r633882205



##########
File path: CMakeLists.txt
##########
@@ -277,7 +278,9 @@ file(GLOB RUNTIME_SRCS
 
 if(BUILD_FOR_HEXAGON)
   # Add file implementing posix_memalign.
-  list(APPEND RUNTIME_SRCS src/runtime/hexagon/hexagon_posix.cc)
+  if(NOT BUILD_STATIC_RUNTIME)
+    list(APPEND RUNTIME_SRCS src/runtime/hexagon/hexagon_posix.cc)

Review comment:
       Because `posix_memalign` function is present in static libc (so you'd get multiple definitions when building a static libtvm_runtime.a). When linking a shared library (libtvm_runtime.so), libc is not linked in, and `posix_memalign` is not always present in the runtime system.




-- 
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:
users@infra.apache.org