Commit 207b932
committed
cmake: build shared libexecutorch_portable_ops when EXECUTORCH_BUILD_SHARED=ON
Create a single libexecutorch_portable_ops.so that bundles
portable_ops_lib and portable_kernels, allowing consumers to link
portable op implementations via a shared library.
portable_ops_lib already has --whole-archive as an INTERFACE link
option from Codegen.cmake, so we do not wrap it in
$<LINK_LIBRARY:WHOLE_ARCHIVE,...> to avoid pulling the registration
constructor in twice. Link against executorch_shared (not
executorch_core) to share a single operator registry.1 parent d39d767 commit 207b932
1 file changed
Lines changed: 32 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
109 | 141 | | |
110 | 142 | | |
111 | 143 | | |
| |||
0 commit comments