Skip to content

Commit

Permalink
pw_toolchain: Transition flag to update rules_cc
Browse files Browse the repository at this point in the history
Adds temporary migration flag so rules_cc can be updated across
downstream projects.

Bug: b/384050813
Change-Id: I9df89a45d858e29d9537cd02bdfac654f284dbf1
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/254432
Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed-service-accounts.iam.gserviceaccount.com>
Docs-Not-Needed: Armando Montanez <amontanez@google.com>
Presubmit-Verified: CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ted Pudlik <tpudlik@google.com>
Pigweed-Auto-Submit: Armando Montanez <amontanez@google.com>
  • Loading branch information
armandomontanez authored and CQ Bot Account committed Dec 18, 2024
1 parent 3e5208e commit e1736b9
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion pw_toolchain/host_clang/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,37 @@ cc_args(
)

cc_feature(
name = "supports_pic",
name = "supports_pic_old",
overrides = "@rules_cc//cc/toolchains/features:supports_pic",
visibility = ["//visibility:private"],
)

# TODO: https://pwbug.dev/384050813 - This flag is a temporary transition flag
# that will be removed shortly.
bool_flag(
name = "new_rules_cc",
build_setting_default = False,
)

config_setting(
name = "rules_cc_post_0.0.10",
flag_values = {
":new_rules_cc": "True",
},
)

cc_feature(
name = "supports_pic_actual",
feature_name = "supports_pic",
visibility = ["//visibility:private"],
)

alias(
name = "supports_pic",
actual = select({
":rules_cc_post_0.0.10": "supports_pic_actual",
"//conditions:default": "supports_pic_old",
}),
)

# Symlink to clangd, for user convenience.
Expand Down

0 comments on commit e1736b9

Please sign in to comment.