@@ -205,6 +205,35 @@ define_overridable_option(
205
205
BOOL ON
206
206
)
207
207
208
+ if (EXECUTORCH_BUILD_ARM_BAREMETAL)
209
+ set (_default_executorch_build_pthreadpool OFF )
210
+ set (_default_executorch_build_cpuinfo OFF )
211
+ else ()
212
+ set (_default_executorch_build_pthreadpool ON )
213
+ set (_default_executorch_build_cpuinfo ON )
214
+ endif ()
215
+ define_overridable_option(
216
+ EXECUTORCH_BUILD_PTHREADPOOL
217
+ "Build pthreadpool library."
218
+ BOOL ${_default_executorch_build_pthreadpool}
219
+ )
220
+ define_overridable_option(
221
+ EXECUTORCH_BUILD_CPUINFO
222
+ "Build cpuinfo library."
223
+ BOOL ${_default_executorch_build_cpuinfo}
224
+ )
225
+
226
+ # TODO(jathu): move this to platform specific presets when created
227
+ set (_default_executorch_build_executor_runner ON )
228
+ if (APPLE AND ${SDK_NAME} STREQUAL "iphoneos" )
229
+ set (_default_executorch_build_executor_runner OFF )
230
+ endif ()
231
+ define_overridable_option(
232
+ EXECUTORCH_BUILD_EXECUTOR_RUNNER
233
+ "Build the executor_runner executable"
234
+ BOOL ${_default_executorch_build_executor_runner}
235
+ )
236
+
208
237
# MARK: - Validations
209
238
# At this point all the options should be configured with their final value.
210
239
@@ -232,3 +261,12 @@ if(EXECUTORCH_ENABLE_EVENT_TRACER)
232
261
message (FATAL_ERROR "Use of 'EXECUTORCH_ENABLE_EVENT_TRACER' requires 'EXECUTORCH_BUILD_DEVTOOLS' to be enabled." )
233
262
endif ()
234
263
endif ()
264
+
265
+
266
+ if (EXECUTORCH_BUILD_ARM_BAREMETAL)
267
+ if (EXECUTORCH_BUILD_PTHREADPOOL)
268
+ message (FATAL_ERROR "Cannot enable both EXECUTORCH_BUILD_PTHREADPOOL and EXECUTORCH_BUILD_ARM_BAREMETAL" )
269
+ elseif (EXECUTORCH_BUILD_CPUINFO)
270
+ message (FATAL_ERROR "Cannot enable both EXECUTORCH_BUILD_CPUINFO and EXECUTORCH_BUILD_ARM_BAREMETAL" )
271
+ endif ()
272
+ endif ()
0 commit comments