mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
Workaround for Bazel issue #8672 (broken fully_static_link)
This is tracked at https://github.com/bazelbuild/bazel/issues/8672 and should only affect the tests for now. PiperOrigin-RevId: 254943708 Change-Id: Iee18a3b8c1b570c7d04d09d533ecff33c3de7d57
This commit is contained in:
parent
97b5f0767a
commit
0c4a803527
|
@ -40,6 +40,9 @@ STATIC_LINKOPTS = [
|
|||
"-Wl,--no-whole-archive",
|
||||
]
|
||||
|
||||
# TODO(https://github.com/bazelbuild/bazel/issues/8672): Remove this workaround
|
||||
EXTRA_FULLY_STATIC_LINKOPTS = ["-l:libstdc++.a"]
|
||||
|
||||
cc_binary(
|
||||
name = "abort",
|
||||
testonly = 1,
|
||||
|
@ -71,7 +74,7 @@ cc_binary(
|
|||
"-pie",
|
||||
"fully_static_link", # link libc statically
|
||||
],
|
||||
linkopts = STATIC_LINKOPTS,
|
||||
linkopts = STATIC_LINKOPTS + EXTRA_FULLY_STATIC_LINKOPTS,
|
||||
linkstatic = 1, # prefer static libraries
|
||||
deps = [
|
||||
"//sandboxed_api/sandbox2:buffer",
|
||||
|
@ -103,6 +106,7 @@ cc_binary(
|
|||
"-pie",
|
||||
"fully_static_link", # link libc statically
|
||||
],
|
||||
linkopts = EXTRA_FULLY_STATIC_LINKOPTS,
|
||||
linkstatic = 1, # prefer static libraries
|
||||
)
|
||||
|
||||
|
@ -149,7 +153,7 @@ cc_binary(
|
|||
"-pie",
|
||||
"fully_static_link", # link libc statically
|
||||
],
|
||||
linkopts = STATIC_LINKOPTS,
|
||||
linkopts = STATIC_LINKOPTS + EXTRA_FULLY_STATIC_LINKOPTS,
|
||||
linkstatic = 1, # prefer static libraries
|
||||
deps = [
|
||||
"//sandboxed_api/sandbox2:client",
|
||||
|
@ -220,6 +224,7 @@ cc_binary(
|
|||
"-pie",
|
||||
"fully_static_link", # link libc statically
|
||||
],
|
||||
linkopts = EXTRA_FULLY_STATIC_LINKOPTS,
|
||||
linkstatic = 1, # prefer static libraries
|
||||
deps = [
|
||||
"//sandboxed_api/sandbox2/util:temp_file",
|
||||
|
|
Loading…
Reference in New Issue
Block a user