Skip to content

Commit c83af25

Browse files
swolchokfacebook-github-bot
authored andcommitted
Add target_link_options_shared_lib to coremldelegate build (#3556)
Summary: Backends use a static initializer to register themselves. We have an established solution to forcing the Apple linker to load the object files containing said initializer, so let's use it for CoreML. Pull Request resolved: #3556 Test Plan: Attempt to load a CoreML PTE from Python no longer fails with error about the backend not being registered Reviewed By: mikekgfb Differential Revision: D57136490 Pulled By: swolchok fbshipit-source-id: 613d7f786fa47f34a94ee4eea7b2a81ef670a573
1 parent 749f6ab commit c83af25

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

backends/apple/coreml/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,8 @@ target_link_libraries(
155155
${FOUNDATION_FRAMEWORK} ${SQLITE_LIBRARY}
156156
)
157157

158+
target_link_options_shared_lib(coremldelegate)
159+
158160
if(COREML_BUILD_EXECUTOR_RUNNER)
159161
target_link_libraries(
160162
coremldelegate PRIVATE portable_ops_lib portable_kernels

0 commit comments

Comments
 (0)