mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
Move dependency on libdl into build defs, like CMake
PiperOrigin-RevId: 281699435 Change-Id: Iced13e98578b2c36a1eeac71fd02a6d7ed87a8fb
This commit is contained in:
parent
ae2954f598
commit
6dd97f5073
|
@ -161,10 +161,6 @@ cc_library(
|
||||||
name = "client",
|
name = "client",
|
||||||
srcs = ["client.cc"],
|
srcs = ["client.cc"],
|
||||||
copts = sapi_platform_copts(),
|
copts = sapi_platform_copts(),
|
||||||
# TODO(124852776): investigate whether this is necessary
|
|
||||||
linkopts = [
|
|
||||||
"-Wl,-ldl",
|
|
||||||
],
|
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
deps = [
|
deps = [
|
||||||
":call",
|
":call",
|
||||||
|
|
|
@ -205,9 +205,12 @@ def sapi_library(
|
||||||
native.cc_binary(
|
native.cc_binary(
|
||||||
name = name + ".bin",
|
name = name + ".bin",
|
||||||
linkopts = [
|
linkopts = [
|
||||||
# The sandboxing client must have access to all
|
"-ldl", # For dlopen(), dlsym()
|
||||||
"-Wl,-E", # symbols used in the sandboxed library, so these
|
# The sandboxing client must have access to all symbols used in
|
||||||
] + exported_funcs, # must be both referenced, and exported
|
# the sandboxed library, so these must be both referenced, and
|
||||||
|
# exported
|
||||||
|
"-Wl,-E",
|
||||||
|
] + exported_funcs,
|
||||||
deps = [
|
deps = [
|
||||||
":" + name + ".lib",
|
":" + name + ".lib",
|
||||||
rprefix + "//sandboxed_api:client",
|
rprefix + "//sandboxed_api:client",
|
||||||
|
@ -217,9 +220,7 @@ def sapi_library(
|
||||||
|
|
||||||
native.cc_library(
|
native.cc_library(
|
||||||
name = name + ".lib",
|
name = name + ".lib",
|
||||||
deps = [
|
deps = [lib],
|
||||||
lib,
|
|
||||||
],
|
|
||||||
alwayslink = 1, # All functions are linked into depending binaries
|
alwayslink = 1, # All functions are linked into depending binaries
|
||||||
**common
|
**common
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user