Skip to content

Commit 1310767

Browse files
lucylqYIWENX14
authored andcommitted
Readability refactor
Differential Revision: D68044167 Pull Request resolved: #7611
1 parent 6a183d9 commit 1310767

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

shim/xplat/executorch/codegen/codegen.bzl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -397,11 +397,11 @@ def build_portable_lib(name, oplist_header_name, feature = None, expose_operator
397397
# Currently fbcode links all dependent libraries through shared
398398
# library, and it blocks users like unit tests to use kernel
399399
# implementation directly. So we enable this for xplat only.
400-
compiler_flags = ["-Wno-missing-prototypes", "-fvisibility=hidden"]
401-
if expose_operator_symbols:
400+
compiler_flags = ["-Wno-missing-prototypes"]
401+
if not expose_operator_symbols:
402402
# Removing '-fvisibility=hidden' exposes operator symbols.
403403
# This allows operators to be called outside of the kernel registry.
404-
compiler_flags = ["-Wno-missing-prototypes"]
404+
compiler_flags += ["-fvisibility=hidden"]
405405

406406
# Build portable lib.
407407
runtime.cxx_library(

0 commit comments

Comments
 (0)