From 70aa5806bea596777f518e1a9b17ab28d7db4f6c Mon Sep 17 00:00:00 2001 From: lucylq Date: Thu, 22 May 2025 19:21:06 -0700 Subject: [PATCH] Enable dtype selective build if not fbcode for jarvis ^ Differential Revision: [D75256223](https://our.internmc.facebook.com/intern/diff/D75256223/) [ghstack-poisoned] --- examples/selective_build/targets.bzl | 4 ++-- shim_et/xplat/executorch/codegen/codegen.bzl | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/examples/selective_build/targets.bzl b/examples/selective_build/targets.bzl index 685cf5068e4..4525b8f730f 100644 --- a/examples/selective_build/targets.bzl +++ b/examples/selective_build/targets.bzl @@ -65,7 +65,7 @@ def define_common_targets(): deps = [ ":select_ops_in_dict", ], - dtype_selective_build = True, + dtype_selective_build = is_xplat(), visibility = ["//executorch/..."], ) @@ -78,7 +78,7 @@ def define_common_targets(): deps = [ ":select_ops_in_dict", ], - dtype_selective_build = True, + dtype_selective_build = is_xplat(), visibility = ["//executorch/..."], ) diff --git a/shim_et/xplat/executorch/codegen/codegen.bzl b/shim_et/xplat/executorch/codegen/codegen.bzl index df4e2f41c8f..d12d8424777 100644 --- a/shim_et/xplat/executorch/codegen/codegen.bzl +++ b/shim_et/xplat/executorch/codegen/codegen.bzl @@ -644,8 +644,7 @@ def executorch_generated_lib( if dtype_selective_build: if not expose_operator_symbols and not is_xplat(): - # TODO(T225169282): make this a fail once internal cases move to xplat. - warning(""" + fail(""" Dtype selective build with expose_operator_symbols=False works only in xplat - there are undefined symbols otherwise. Please try to use xplat, or talk to the executorch team. Setting expose_operator_symbols=True is not recommended as the