diff --git a/shim/xplat/executorch/kernels/portable/op_registration_util.bzl b/shim/xplat/executorch/kernels/portable/op_registration_util.bzl index c5349b9475b..6a25f35c304 100644 --- a/shim/xplat/executorch/kernels/portable/op_registration_util.bzl +++ b/shim/xplat/executorch/kernels/portable/op_registration_util.bzl @@ -150,7 +150,7 @@ def define_op_library(name, deps, android_deps, aten_target, _allow_third_party_ # library, and it blocks users like unit tests to use kernel # implementation directly. So we enable this for xplat only. ["-fvisibility=hidden"] if is_xplat() else [] - ), + ) + get_compiler_optimization_flags(), deps = [ "//executorch/runtime/kernel:kernel_includes" + aten_suffix, ] + deps,