Skip to content

Commit e8cf7e3

Browse files
author
Github Executorch
committed
work around missing os:iphoneos on "Reapply "Depend on extension/threadpool, not thread_parallel_interface, in buck (#9511)""
Trying again with internal fixes. Original summary: I planned to do this everywhere and forgot. Clean it all up, leave a note, enforce the note with visibility. This makes sure everything in buck-land gets ET_USE_THREADPOOL. Differential Revision: [D72090889](https://our.internmc.facebook.com/intern/diff/D72090889/) [ghstack-poisoned]
1 parent d4752b7 commit e8cf7e3

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

extension/threadpool/targets.bzl

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ def define_common_targets():
4747

4848
runtime.cxx_library(
4949
name = "threadpool",
50-
exported_deps = select({
50+
# TODO: OSS doesn't have os:iphoneos. Sync buck2 prelude
51+
# update to add it and remove duplication.
52+
exported_deps = (select({
5153
# Major operating systems should be able to use threadpool.
5254
"ovr_config//os:linux": [":threadpool_lib"],
5355
"ovr_config//os:macos": [":threadpool_lib"],
@@ -58,7 +60,17 @@ def define_common_targets():
5860
"ovr_config//os:none": ["//executorch/runtime/kernel:thread_parallel_interface"],
5961
# If we don't know what it is, disable threadpool out of caution.
6062
"DEFAULT": ["//executorch/runtime/kernel:thread_parallel_interface"],
61-
}),
63+
}) if not runtime.is_oss else select({
64+
# Major operating systems should be able to use threadpool.
65+
"ovr_config//os:linux": [":threadpool_lib"],
66+
"ovr_config//os:macos": [":threadpool_lib"],
67+
"ovr_config//os:windows": [":threadpool_lib"],
68+
"ovr_config//os:android": [":threadpool_lib"],
69+
# Machines without an operating system shouldn't.
70+
"ovr_config//os:none": ["//executorch/runtime/kernel:thread_parallel_interface"],
71+
# If we don't know what it is, disable threadpool out of caution.
72+
"DEFAULT": ["//executorch/runtime/kernel:thread_parallel_interface"],
73+
})),
6274
visibility = [
6375
"//executorch/...",
6476
"@EXECUTORCH_CLIENTS",

0 commit comments

Comments
 (0)