diff --git a/bazel/config/BUILD.bazel b/bazel/config/BUILD.bazel index 448260de88..7af7ccb606 100644 --- a/bazel/config/BUILD.bazel +++ b/bazel/config/BUILD.bazel @@ -22,6 +22,13 @@ config_setting( }, ) +config_setting( + name = "is_opt", + values = { + "compilation_mode": "opt", + }, +) + config_setting( name = "is_debug", values = { diff --git a/bazel/defs.bzl b/bazel/defs.bzl index 77e86ef6f2..8c3e3b9d1d 100644 --- a/bazel/defs.bzl +++ b/bazel/defs.bzl @@ -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": [