[TF] Export grpc symbols in dynamic libraries. Why? See file comments.

PiperOrigin-RevId: 291558351
Change-Id: I637b01488e84c4c345495190ac8f11b4afed6845
This commit is contained in:
Eugene Brevdo 2020-01-25 16:17:48 -08:00 committed by TensorFlower Gardener
parent 520cee1eeb
commit c044803bcd
3 changed files with 19 additions and 1 deletions

View File

@ -8,3 +8,12 @@
*nsync_*
*stream_executor*
*xla*
# Though it may seem unsafe to export grpc, any .so files that rely on gRPC
# MUST do it through tensorflow's version, because gRPC uses link-time
# object registration, and if they hard link their own gRPC dependencies
# then at load time you get a segfault due to registration collissions.
# As a result, any dynamic libraries relying on gRPC must build with gRPC
# deps in header-only mode, and rely on tensorflow's symbol exports at
# link-time.
*grpc*

View File

@ -9,6 +9,14 @@ tensorflow {
*nsync_*;
*stream_executor*;
*xla*;
# Though it may seem unsafe to export grpc, any .so files that rely on gRPC
# MUST do it through tensorflow's version, because gRPC uses link-time
# object registration, and if they hard link their own gRPC dependencies
# then at load time you get a segfault due to registration collissions.
# As a result, any dynamic libraries relying on gRPC must build with gRPC
# deps in header-only mode, and rely on tensorflow's symbol exports at
# link-time.
*grpc*;
local:
*;
};

View File

@ -71,7 +71,8 @@ INCLUDE_RE = re.compile(r"^(TF_\w*)$|"
r"tensorflow::|"
r"toco::|"
r"functor::|"
r"perftools::gputools")
r"perftools::gputools|"
r"grpc::")
# We want to identify data members explicitly in the DEF file, so that no one
# can implicitly link against the DLL if they use one of the variables exported