Skip to content

Commit 8328fa0

Browse files
Extending build systems to include FBCode
Differential Revision: D70786405 Pull Request resolved: #27
1 parent 3acfaf5 commit 8328fa0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

targets.bzl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
load("@fbsource//tools/build_defs:platform_defs.bzl", "ANDROID", "APPLE", "CXX", "FBCODE")
12
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
23
load("@fbsource//xplat/executorch/third-party:glob_defs.bzl", "subdir_glob")
34

5+
PLATFORMS = (CXX, ANDROID, APPLE, FBCODE)
6+
47
def define_common_targets():
58
"""Defines targets that should be shared between fbcode and xplat.
69
@@ -18,6 +21,7 @@ def define_common_targets():
1821
"//pytorch/tokenizers/...",
1922
],
2023
header_namespace = "",
24+
platforms = PLATFORMS,
2125
)
2226

2327
runtime.cxx_library(
@@ -39,6 +43,7 @@ def define_common_targets():
3943
"sentencepiece",
4044
"abseil-cpp",
4145
],
46+
platforms = PLATFORMS,
4247
)
4348

4449
runtime.cxx_library(
@@ -60,6 +65,7 @@ def define_common_targets():
6065
exported_external_deps = [
6166
"re2",
6267
],
68+
platforms = PLATFORMS,
6369
)
6470

6571
runtime.cxx_library(
@@ -72,6 +78,7 @@ def define_common_targets():
7278
("include", "pytorch/tokenizers/third-party/llama.cpp-unicode/*.h"),
7379
]),
7480
header_namespace = "",
81+
platforms = PLATFORMS,
7582
)
7683

7784
runtime.cxx_library(
@@ -97,6 +104,7 @@ def define_common_targets():
97104
"re2",
98105
"nlohmann_json",
99106
],
107+
platforms = PLATFORMS,
100108
)
101109

102110
runtime.cxx_library(
@@ -111,4 +119,5 @@ def define_common_targets():
111119
"@EXECUTORCH_CLIENTS",
112120
"//pytorch/tokenizers/...",
113121
],
122+
platforms = PLATFORMS,
114123
)

0 commit comments

Comments
 (0)