diff --git a/codegen/tools/targets.bzl b/codegen/tools/targets.bzl index 62037b92300..fb629adf047 100644 --- a/codegen/tools/targets.bzl +++ b/codegen/tools/targets.bzl @@ -28,6 +28,7 @@ def define_common_targets(is_fbcode = False): deps = [ ":gen_oplist_lib", ], + preload_deps = [] if runtime.is_oss else ["//executorch/codegen/tools/fb:selective_build"], # TODO(larryliu0820) :selective_build doesn't build in OSS yet package_style = "inplace", visibility = [ "//executorch/...", diff --git a/shim_et/xplat/executorch/build/runtime_wrapper.bzl b/shim_et/xplat/executorch/build/runtime_wrapper.bzl index 4060746426f..c0e8103f52f 100644 --- a/shim_et/xplat/executorch/build/runtime_wrapper.bzl +++ b/shim_et/xplat/executorch/build/runtime_wrapper.bzl @@ -193,7 +193,7 @@ def _patch_kwargs_common(kwargs): # Patch up references to "//executorch/..." in lists of build targets, # if necessary. use_static_deps = kwargs.pop("use_static_deps", False) - for dep_type in ("deps", "exported_deps", "visibility"): + for dep_type in ("deps", "exported_deps", "visibility", "preload_deps"): if kwargs.get(dep_type): # deps may contain select() elements, dicts that map names to lists # of targets. selects.apply() will run the provided function on all