diff --git a/docs/TARGETS b/docs/BUCK similarity index 88% rename from docs/TARGETS rename to docs/BUCK index a0281b8b782..490d3471fb3 100644 --- a/docs/TARGETS +++ b/docs/BUCK @@ -1,9 +1,10 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") load("@fbcode_macros//build_defs:native_rules.bzl", "buck_filegroup", "buck_sh_test") load("@fbcode_macros//build_defs:python_binary.bzl", "python_binary") oncall("executorch") -python_binary( +fbcode_target(_kind = python_binary, name = "sphinx", main_module = "sphinx.cmd.build", par_style = "xar", @@ -30,12 +31,12 @@ python_binary( ], ) -buck_filegroup( +fbcode_target(_kind = buck_filegroup, name = "source", srcs = glob(["source/**/*"]), ) -buck_sh_test( +fbcode_target(_kind = buck_sh_test, name = "doctest", args = [ "-M", diff --git a/examples/apple/coreml/llama/TARGETS b/examples/apple/coreml/llama/BUCK similarity index 87% rename from examples/apple/coreml/llama/TARGETS rename to examples/apple/coreml/llama/BUCK index eedb88774e0..c012e260eb0 100644 --- a/examples/apple/coreml/llama/TARGETS +++ b/examples/apple/coreml/llama/BUCK @@ -1,9 +1,10 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") # Any targets that should be shared between fbcode and xplat must be defined in # targets.bzl. This file can contain fbcode-only targets. load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "llama_transformer", srcs = [ "llama_transformer.py", @@ -17,7 +18,7 @@ runtime.python_library( ], ) -runtime.python_library( +fbcode_target(_kind = runtime.python_library, name = "utils", srcs = [ "utils.py", @@ -30,7 +31,7 @@ runtime.python_library( ], ) -runtime.python_binary( +fbcode_target(_kind = runtime.python_binary, name = "export", srcs = [ "export.py", diff --git a/examples/apple/coreml/scripts/TARGETS b/examples/apple/coreml/scripts/BUCK similarity index 82% rename from examples/apple/coreml/scripts/TARGETS rename to examples/apple/coreml/scripts/BUCK index c47af5235f7..01f1d588ecd 100644 --- a/examples/apple/coreml/scripts/TARGETS +++ b/examples/apple/coreml/scripts/BUCK @@ -1,8 +1,9 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") # Any targets that should be shared between fbcode and xplat must be defined in # targets.bzl. This file can contain fbcode-only targets. load("@fbcode_macros//build_defs:python_binary.bzl", "python_binary") -python_binary( +fbcode_target(_kind = python_binary, name = "export", srcs = [ "export.py", diff --git a/examples/apple/mps/executor_runner/BUCK b/examples/apple/mps/executor_runner/BUCK index 5fe34f9aa41..1d1d40e1384 100644 --- a/examples/apple/mps/executor_runner/BUCK +++ b/examples/apple/mps/executor_runner/BUCK @@ -1,3 +1,5 @@ +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target") +oncall("executorch") # # Copyright (c) 2023 Apple Inc. All rights reserved. # Provided subject to the LICENSE file in the top level directory. @@ -8,6 +10,20 @@ load(":targets.bzl", "define_common_targets") -oncall("executorch") -define_common_targets() +non_fbcode_target(_kind = define_common_targets,) + +# !!!! fbcode/executorch/examples/apple/mps/executor_runner/TARGETS was merged into this file, see https://fburl.com/workplace/xl8l9yuo for more info !!!! + +# +# Copyright (c) 2023 Apple Inc. All rights reserved. +# Provided subject to the LICENSE file in the top level directory. +# + +# Any targets that should be shared between fbcode and xplat must be defined in +# targets.bzl. This file can contain fbcode-only targets. + +load(":targets.bzl", "define_common_targets") + + +fbcode_target(_kind = define_common_targets,) diff --git a/examples/apple/mps/executor_runner/TARGETS b/examples/apple/mps/executor_runner/TARGETS deleted file mode 100644 index 3926187e5e5..00000000000 --- a/examples/apple/mps/executor_runner/TARGETS +++ /dev/null @@ -1,13 +0,0 @@ -# -# Copyright (c) 2023 Apple Inc. All rights reserved. -# Provided subject to the LICENSE file in the top level directory. -# - -# Any targets that should be shared between fbcode and xplat must be defined in -# targets.bzl. This file can contain fbcode-only targets. - -load(":targets.bzl", "define_common_targets") - -oncall("executorch") - -define_common_targets()