File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 5151# wouldn't preserve the static type annotations.
5252#
5353# Note that all of these are experimental, and subject to change without notice.
54+
55+ # Set dlopen flags to RTLD_GLOBAL to ensure that the symbols in _portable_lib can
56+ # be found by another shared library (for example, in AOTI where we want to load
57+ # an AOTI compiled .so file with needed symbols defined in _portable_lib).
58+ prev = sys .getdlopenflags ()
59+ sys .setdlopenflags (prev | os .RTLD_GLOBAL )
5460from executorch .extension .pybindings ._portable_lib import ( # noqa: F401
5561 # Disable "imported but unused" (F401) checks.
5662 _create_profile_block , # noqa: F401
7379 MethodMeta , # noqa: F401
7480 Verification , # noqa: F401
7581)
82+ sys .setdlopenflags (prev )
7683
7784# Clean up so that `dir(portable_lib)` is the same as `dir(_portable_lib)`
7885# (apart from some __dunder__ names).
You can’t perform that action at this time.
0 commit comments