From 1e74b4c48ce13002ab501538811bf04e8d546016 Mon Sep 17 00:00:00 2001 From: Lucy Qiu Date: Fri, 10 Jan 2025 15:48:02 -0800 Subject: [PATCH] Readability refactor Summary: Follow-up from D67229096 Differential Revision: D68044167 --- shim/xplat/executorch/codegen/codegen.bzl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shim/xplat/executorch/codegen/codegen.bzl b/shim/xplat/executorch/codegen/codegen.bzl index 46cdaebcb34..8e0e89eda57 100644 --- a/shim/xplat/executorch/codegen/codegen.bzl +++ b/shim/xplat/executorch/codegen/codegen.bzl @@ -397,11 +397,11 @@ def build_portable_lib(name, oplist_header_name, feature = None, expose_operator # Currently fbcode links all dependent libraries through shared # library, and it blocks users like unit tests to use kernel # implementation directly. So we enable this for xplat only. - compiler_flags = ["-Wno-missing-prototypes", "-fvisibility=hidden"] - if expose_operator_symbols: + compiler_flags = ["-Wno-missing-prototypes"] + if not expose_operator_symbols: # Removing '-fvisibility=hidden' exposes operator symbols. # This allows operators to be called outside of the kernel registry. - compiler_flags = ["-Wno-missing-prototypes"] + compiler_flags += ["-fvisibility=hidden"] # Build portable lib. runtime.cxx_library(