Skip to content

Remove unused functions from features #178

Closed

Description

@nradakovic

Remove unused compute_feature_lists functions

Description

Two definitions of compute_feature_lists are dead code:

  • features/make_cc_features.bzl
    • The whole file is unused. No BUILD, .bzl or template loads it.
    • Its only function calls linux_known_features(), linux_enabled_features(), qnx_known_features() and qnx_enabled_features(), which are not defined in that file. It could not run if it were loaded.
  • features/custom/qnx/make_cc_features.bzl
    • compute_feature_lists(target_os) consists of a docstring only, with no body. Nothing calls it.

The real entry point is get_feature_lists() in features/custom/<os>/make_cc_features.bzl. templates/BUILD.template loads it through %{tc_os}. The Linux file has no compute_feature_lists.

templates/BUILD.template also has a comment that points readers to the non-existent compute_feature_lists().

Tasks

  • Delete features/make_cc_features.bzl.
  • Remove the compute_feature_lists stub from features/custom/qnx/make_cc_features.bzl.
  • Update the comment in templates/BUILD.template to reference get_feature_lists().
  • Confirm no references to compute_feature_lists or features/make_cc_features.bzl remain in the repo, including docs. A search found none in the docs.
  • Verify that Linux and QNX toolchain generation and the existing tests still pass.

Acceptance criteria

  • No definition of or reference to compute_feature_lists remains in the repository.
  • get_feature_lists() in the per-OS make_cc_features.bzl files is unchanged.
  • The build and test suite pass with no behavior change.

Notes

Cleanup only, no functional impact. The documentation does not mention the removed symbols.

Metadata

Metadata

Assignees

Labels

deprecated cleanupRemove deprecated targetsp4Negligible impact - improvements and/or cosmetic features.

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions