Skip to content

Commit d1a4aea

Browse files
hvadehracopybara-github
authored andcommitted
Delete unused cc rules code from Bazel
PiperOrigin-RevId: 855081586 Change-Id: Ifd68f3d6f3a06a26e23e4a9d732680f7d1e33dc9
1 parent 6dd2ef1 commit d1a4aea

33 files changed

Lines changed: 4 additions & 100 deletions

cc/cc_toolchain_config_lib.bzl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
# LINT.IfChange(forked_exports)
1514
""" A library of functions creating structs for CcToolchainConfigInfo."""
1615

1716
def _check_is_none(obj, parameter_name, method_name):
@@ -615,5 +614,3 @@ def artifact_name_pattern(category_name, prefix, extension):
615614
extension = extension,
616615
type_name = "artifact_name_pattern",
617616
)
618-
619-
# LINT.ThenChange(https://github.com/bazelbuild/bazel/blob/master/src/main/starlark/builtins_bzl/common/cc/toolchain_config/cc_toolchain_config_lib.bzl:forked_exports)

cc/common/cc_helper.bzl

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,10 @@ load(":visibility.bzl", "INTERNAL_VISIBILITY")
3434

3535
visibility(INTERNAL_VISIBILITY)
3636

37-
# LINT.IfChange(linker_mode)
3837
linker_mode = struct(
3938
LINKING_DYNAMIC = "dynamic_linking_mode",
4039
LINKING_STATIC = "static_linking_mode",
4140
)
42-
# LINT.ThenChange(https://github.com/bazelbuild/bazel/blob/master/src/main/starlark/builtins_bzl/common/cc/cc_helper.bzl:linker_mode)
43-
44-
# LINT.IfChange(forked_exports)
4541

4642
cpp_file_types = struct(
4743
LINKER_SCRIPT = ["ld", "lds", "ldscript"],
@@ -1143,4 +1139,3 @@ cc_helper = struct(
11431139
package_exec_path = _package_exec_path,
11441140
should_create_test_dwp_for_statically_linked_test = _should_create_test_dwp_for_statically_linked_test,
11451141
)
1146-
# LINT.ThenChange(https://github.com/bazelbuild/bazel/blob/master/src/main/starlark/builtins_bzl/common/cc/cc_helper.bzl:forked_exports)

cc/common/cc_helper_internal.bzl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
# LINT.IfChange(forked_exports)
1514
"""
1615
Utility functions for C++ rules that don't depend on cc_common.
1716
@@ -44,6 +43,8 @@ CPP_SOURCE_TYPE_HEADER = "HEADER"
4443
CPP_SOURCE_TYPE_SOURCE = "SOURCE"
4544
CPP_SOURCE_TYPE_CLIF_INPUT_PROTO = "CLIF_INPUT_PROTO"
4645

46+
# LINT.IfChange(forked_exports)
47+
4748
CREATE_COMPILE_ACTION_API_ALLOWLISTED_PACKAGES = [("", "devtools/rust/cc_interop"), ("", "third_party/crubit"), ("", "tools/build_defs/clif")]
4849

4950
PRIVATE_STARLARKIFICATION_ALLOWLIST = [
@@ -87,6 +88,8 @@ PRIVATE_STARLARKIFICATION_ALLOWLIST = [
8788
("", "javatests/com/google/devtools/grok/kythe"),
8889
] + CREATE_COMPILE_ACTION_API_ALLOWLISTED_PACKAGES
8990

91+
# LINT.ThenChange(https://github.com/bazelbuild/bazel/blob/master/src/main/starlark/builtins_bzl/common/cc/cc_helper_internal.bzl:forked_exports)
92+
9093
_CC_SOURCE = [".cc", ".cpp", ".cxx", ".c++", ".C", ".cu", ".cl"]
9194
_C_SOURCE = [".c"]
9295
_OBJC_SOURCE = [".m"]
@@ -335,8 +338,6 @@ def use_pic_for_dynamic_libs(cpp_config, feature_configuration):
335338
return (cpp_config.force_pic() or
336339
feature_configuration.is_enabled("supports_pic"))
337340

338-
# LINT.ThenChange(https://github.com/bazelbuild/bazel/blob/master/src/main/starlark/builtins_bzl/common/cc/cc_helper_internal.bzl:forked_exports)
339-
340341
def get_relative_path(path_a, path_b):
341342
if is_path_absolute(path_b):
342343
return path_b

cc/private/cc_common.bzl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
# LINT.IfChange(forked_exports)
1514
"""Utilities related to C++ support."""
1615

1716
load(
@@ -787,5 +786,3 @@ cc_common = struct(
787786
solib_symlink_action = _solib_symlink_action,
788787
cc_toolchain_variables = _cc_toolchain_variables,
789788
)
790-
791-
# LINT.ThenChange(https://github.com/bazelbuild/bazel/blob/master/src/main/starlark/builtins_bzl/common/cc/cc_common.bzl:forked_exports)

cc/private/cc_info.bzl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License
14-
# LINT.IfChange(forked_exports)
1514
"""
1615
Definition of CcInfo provider.
1716
"""
@@ -652,5 +651,3 @@ def merge_cc_infos(*, direct_cc_infos = [], cc_infos = []):
652651
debug_context = merge_debug_context(cc_debug_info_contexts),
653652
cc_native_library_info = CcNativeLibraryInfo(libraries_to_link = depset(order = "topological", transitive = transitive_native_cc_libraries)),
654653
)
655-
656-
# LINT.ThenChange(https://github.com/bazelbuild/bazel/blob/master/src/main/starlark/builtins_bzl/common/cc/cc_info.bzl:forked_exports)

cc/private/cc_launcher_info.bzl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
# LINT.IfChange(forked_exports)
1514
"""Provider that signals that rules that use launchers can use this target as the launcher."""
1615

1716
load("//cc/common:cc_helper_internal.bzl", "wrap_with_check_private_api")
@@ -30,4 +29,3 @@ CcLauncherInfo, _ = provider(
3029
},
3130
init = _cc_launcher_info_constructor,
3231
)
33-
# LINT.ThenChange(https://github.com/bazelbuild/bazel/blob/master/src/main/starlark/builtins_bzl/common/cc/cc_launcher_info.bzl:forked_exports)

cc/private/cc_shared_library_hint_info.bzl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
# LINT.IfChange(forked_exports)
1514
"""CcSharedLibraryHintInfo provider.
1615
1716
Needed in a separate file to break cycle with cc_common. cc_common needs a
@@ -55,5 +54,3 @@ CcSharedLibraryHintInfo = provider(
5554
"the original name as part of your new name, limiting your custom addition to a prefix or suffix."),
5655
},
5756
)
58-
59-
# LINT.ThenChange(https://github.com/bazelbuild/bazel/blob/master/src/main/starlark/builtins_bzl/common/cc/cc_shared_library_hint_info.bzl:forked_exports)

cc/private/compile/cc_compilation_helper.bzl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
# LINT.IfChange(forked_exports)
1514
"""Compilation helper for C++ rules."""
1615

1716
load("@bazel_skylib//lib:paths.bzl", "paths")
@@ -627,5 +626,3 @@ def serialized_diagnostics_file_enabled(feature_configuration):
627626
cc_compilation_helper = struct(
628627
init_cc_compilation_context = _init_cc_compilation_context,
629628
)
630-
631-
# LINT.ThenChange(https://github.com/bazelbuild/bazel/blob/master/src/main/starlark/builtins_bzl/common/cc/compile/cc_compilation_helper.bzl:forked_exports)

cc/private/compile/cc_compilation_outputs.bzl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
# LINT.IfChange(forked_exports)
1514
"""
1615
The CcCompilationOutputs provider.
1716
"""
@@ -225,5 +224,3 @@ def merge_compilation_outputs(*, compilation_outputs):
225224
_header_tokens = header_tokens,
226225
_module_files = module_files,
227226
)
228-
229-
# LINT.ThenChange(https://github.com/bazelbuild/bazel/blob/master/src/main/starlark/builtins_bzl/common/cc/compile/cc_compilation_outputs.bzl:forked_exports)

cc/private/compile/compile.bzl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
# LINT.IfChange(forked_exports)
1514
"""
1615
The cc_common.compile function.
1716
@@ -2296,5 +2295,3 @@ def _maybe_declare_gcno_file(
22962295
),
22972296
)
22982297
return gcno_file
2299-
2300-
# LINT.ThenChange(https://github.com/bazelbuild/bazel/blob/master/src/main/starlark/builtins_bzl/common/cc/compile/compile.bzl:forked_exports)

0 commit comments

Comments
 (0)