mirror of
https://github.com/vale981/ray
synced 2025-03-04 17:41:43 -05:00
Hide other symbols in libray_api.so only keep ray* (#26069)
This commit is contained in:
parent
ab44133fba
commit
c8a90e00ac
3 changed files with 38 additions and 0 deletions
|
@ -6,11 +6,24 @@ load("//bazel:ray.bzl", "COPTS")
|
|||
cc_binary(
|
||||
name = "libray_api.so",
|
||||
copts = COPTS,
|
||||
linkopts = select({
|
||||
"@bazel_tools//src/conditions:darwin": [
|
||||
"-Wl,-exported_symbols_list,$(location :symbols/ray_api_exported_symbols_mac.lds)",
|
||||
],
|
||||
"@bazel_tools//src/conditions:windows": [
|
||||
#TODO(larry): Hide the symbols when we make it work on Windows.
|
||||
],
|
||||
"//conditions:default": [
|
||||
"-Wl,--version-script,$(location :symbols/ray_api_exported_symbols_linux.lds)",
|
||||
],
|
||||
}),
|
||||
linkshared = 1,
|
||||
linkstatic = 1,
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
":ray_api",
|
||||
":symbols/ray_api_exported_symbols_linux.lds",
|
||||
":symbols/ray_api_exported_symbols_mac.lds",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
15
cpp/symbols/ray_api_exported_symbols_linux.lds
Normal file
15
cpp/symbols/ray_api_exported_symbols_linux.lds
Normal file
|
@ -0,0 +1,15 @@
|
|||
# This file defines the C++ symbols that need to be exported (aka ABI, application binary interface).
|
||||
# These symbols will be used by other libraries.
|
||||
# Note: This file is used for linux only, and should be kept in sync with `ray_api_exported_symbols.lds`.
|
||||
# Ray ABI is not finalized, the exact set of exported (C/C++) APIs is subject to change.
|
||||
VERSION_1.0 {
|
||||
global:
|
||||
# common
|
||||
*[0-9]ray[0-9]*;
|
||||
TaskExecutionHandler;
|
||||
GetFunctionManager;
|
||||
GetRemoteFunctions;
|
||||
InitRayRuntime;
|
||||
local:
|
||||
*;
|
||||
};
|
10
cpp/symbols/ray_api_exported_symbols_mac.lds
Normal file
10
cpp/symbols/ray_api_exported_symbols_mac.lds
Normal file
|
@ -0,0 +1,10 @@
|
|||
# This file defines the C++ symbols that need to be exported (aka ABI, application binary interface).
|
||||
# These symbols will be used by other libraries.
|
||||
# Note: This file is used for macOS only, and should be kept in sync with `ray_api_version_script.lds`.
|
||||
# Ray ABI is not finalized, the exact set of exported (C/C++) APIs is subject to change.
|
||||
# common
|
||||
*[0-9]ray[0-9]*;
|
||||
TaskExecutionHandler;
|
||||
GetFunctionManager;
|
||||
GetRemoteFunctions;
|
||||
InitRayRuntime;
|
Loading…
Add table
Reference in a new issue