Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions cc/toolchains/args/layering_check/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# ],
# known_features = [
# "@rules_cc//cc/toolchains/args/layering_check:layering_check",
# "@rules_cc//cc/toolchains/args/layering_check:use_module_maps",
# ],
#
# And make sure you have 'module_map' set to a module map file that contains
Expand All @@ -25,13 +24,11 @@ cc_feature(
feature_name = "module_maps",
)

# This is no longer necessary, and does nothing. It will be
# removed in a future release.
cc_feature(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is breaking (the comment above asked users to add this feature to their toolchain configuration). We can work around this by leaving a vacant stub cc_feature in place.

# This is no longer necessary, and does nothing. It will be
# removed in a future release.
cc_feature(
    name = "use_module_maps",
    feature_name = "use_module_maps",
)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hrm given how new all this stuff is i kinda think we should just not worry about it. but i guess there's minor risk that someone removes it and then is used with an old rules_cc version that requires it. less of an issue in a post bzlmod world. i added the empty one

name = "use_module_maps",
args = [
":dependent_module_map_files_args",
],
feature_name = "use_module_maps",
requires_any_of = [":module_maps"],
)

cc_feature(
Expand All @@ -40,9 +37,9 @@ cc_feature(
":layering_check_args",
":module_map_file_args",
":module_name_args",
":dependent_module_map_files_args",
],
feature_name = "layering_check",
implies = [":use_module_maps"],
)

cc_args(
Expand Down