Skip to content

Commit

Permalink
PR #58832: Flip --incompatible_enforce_config_setting_visibility in .…
Browse files Browse the repository at this point in the history
…bazelrc to prevent regression

Imported from GitHub PR tensorflow/tensorflow#58832

Related: bazelbuild/bazel#12932 and bazelbuild/bazel#12933
Copybara import of the project:

--
b4edfd47bd9a0c0363a9feb1eb1b48d067e4644e by Yun Peng <[email protected]>:

Flip two incompatible flags in .bazelrc to prevent regression

--
c33c0dd6e5744393fe2b1909efc91dc19bd6dda1 by Yun Peng <[email protected]>:

Add visibility to more targets

--
34d1bfe1564f0905993c26a891f2385b83480e3d by Yun Peng <[email protected]>:

--incompatible_config_setting_private_default_visibility cannot be flipped yet

Merging this change closes #58832

PiperOrigin-RevId: 494895621
  • Loading branch information
meteorcloudy authored and copybara-github committed Dec 13, 2022
1 parent def9b4d commit b496dda
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,12 @@ build --experimental_cc_shared_library
# cc_shared_library ensures no library is linked statically more than once.
build --experimental_link_static_libraries_once=false

# Prevent regressions on those two incompatible changes
# TODO: remove those flags when they are flipped in the default Bazel version TF uses.
build --incompatible_enforce_config_setting_visibility
# TODO: also enable this flag after fixing the visbility violations
# build --incompatible_config_setting_private_default_visibility

# Default options should come above this line.

# Allow builds using libc++ as a linker library
Expand Down
4 changes: 4 additions & 0 deletions tsl/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ alias(
"@local_config_cuda//:is_cuda_enabled",
"@local_config_cuda//cuda:using_clang",
),
visibility = ["//visibility:public"],
)

selects.config_setting_group(
Expand All @@ -39,6 +40,7 @@ selects.config_setting_group(
":is_cuda_enabled",
":oss",
],
visibility = ["//visibility:public"],
)

# Crosses between framework_shared_object and a bunch of other configurations
Expand Down Expand Up @@ -79,6 +81,7 @@ selects.config_setting_group(
":macos_x86_64_with_framework_shared_object",
":macos_arm64_with_framework_shared_object",
],
visibility = ["//visibility:public"],
)

# This should be removed after Tensorflow moves to cc_shared_library
Expand Down Expand Up @@ -356,6 +359,7 @@ selects.config_setting_group(
":linux_aarch64",
":linux_armhf",
],
visibility = ["//visibility:public"],
)

# TODO(jakeharmon): Remove equivalent from tensorflow/BUILD
Expand Down

0 comments on commit b496dda

Please sign in to comment.