[bazel] Add hide symbols from release build

This is a reland of https://chromium-review.googlesource.com/c/v8/v8/+/3925698

Change-Id: Ic3f2084f29088fc2154931181da2b027b8ad7eff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4042292
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84416}
This commit is contained in:
Victor Gomes 2022-11-21 16:48:33 +01:00 committed by V8 LUCI CQ
parent 8757293d7e
commit 5007e30e96
2 changed files with 15 additions and 0 deletions

View File

@ -22,6 +22,13 @@ config_setting(
},
)
config_setting(
name = "is_opt",
values = {
"compilation_mode": "opt",
},
)
config_setting(
name = "is_debug",
values = {

View File

@ -152,6 +152,14 @@ def _default_args():
],
"//conditions:default": [],
}),
cxxopts = select({
"//third_party/v8/HEAD/google3/config:is_opt": [
"-fvisibility=hidden",
"-fvisibility-inlines-hidden",
],
"//conditions:default": [
],
}),
includes = ["include"],
linkopts = select({
"@v8//bazel/config:is_windows": [