Summary:
Fixes https://github.com/pytorch/pytorch/issues/66030
Pull Request resolved: https://github.com/pytorch/pytorch/pull/66031
Reviewed By: VitalyFedyunin
Differential Revision:
D31356243
Pulled By: malfet
fbshipit-source-id:
d1537bc65bbba5d6497ecb8db7160a397eca81fd
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
endif()
+if(BUILD_BINARY)
+ add_library(aot_compiler SHARED
+ ${TORCH_SRC_DIR}/csrc/jit/mobile/nnc/aot_compiler.cpp
+ )
+ install(TARGETS aot_compiler DESTINATION lib)
+endif()
+
if(NOT BUILD_PYTHON)
return()
endif()
# Pybind11 requires explicit linking of the torch_python library
target_link_libraries(nnapi_backend torch torch_python)
endif()
-
-if(BUILD_BINARY)
- add_library(aot_compiler SHARED
- ${TORCH_SRC_DIR}/csrc/jit/mobile/nnc/aot_compiler.cpp
- )
-endif()