@@ -32,6 +32,7 @@ tvm_option(USE_LLVM "Build with LLVM, can be set to specific llvm-config path" O
3232tvm_option(USE_STACKVM_RUNTIME "Include stackvm into the runtime" OFF )
3333tvm_option(USE_GRAPH_RUNTIME "Build with tiny graph runtime" ON )
3434tvm_option(USE_GRAPH_RUNTIME_DEBUG "Build with tiny graph runtime debug mode" OFF )
35+ tvm_option(USE_SGX "Build with SGX" OFF )
3536tvm_option(USE_RTTI "Build with RTTI" ON )
3637tvm_option(USE_MSVC_MT "Build with MT" OFF )
3738tvm_option(INSTALL_DEV "Install compiler infrastructure" OFF )
@@ -170,6 +171,7 @@ include(cmake/modules/OpenGL.cmake)
170171include (cmake/modules/Vulkan.cmake)
171172include (cmake/modules/Metal.cmake)
172173include (cmake/modules/ROCM.cmake)
174+ include (cmake/modules/SGX.cmake)
173175include (cmake/modules/LLVM.cmake)
174176include (cmake/modules/contrib/BLAS.cmake)
175177include (cmake/modules/contrib/Random.cmake)
@@ -179,6 +181,9 @@ include(cmake/modules/contrib/NNPack.cmake)
179181add_library (tvm SHARED ${COMPILER_SRCS} ${RUNTIME_SRCS} )
180182add_library (tvm_topi SHARED ${TOPI_SRCS} )
181183add_library (tvm_runtime SHARED ${RUNTIME_SRCS} )
184+ if (NOT USE_SGX STREQUAL "OFF" )
185+ add_dependencies (tvm_runtime sgx_edl)
186+ endif ()
182187add_library (nnvm_compiler SHARED ${NNVM_COMPILER_SRCS} )
183188
184189target_link_libraries (tvm ${TVM_LINKER_LIBS} ${TVM_RUNTIME_LINKER_LIBS} )
0 commit comments