-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Closed
Labels
P1I'll work on this now. (Assignee required)I'll work on this now. (Assignee required)incompatible-changeIncompatible/breaking changeIncompatible/breaking changeteam-Rules-CPPIssues for C++ rulesIssues for C++ rules
Description
Flag: --incompatible_require_ctx_in_configure_features
Available since: 0.25
Will be flipped in: 0.26
Tracking issue: #6516
Motivation
In order to migrate C++ rules to platforms, we need the access to the C++ configuration fragment in Starlark APIs. All existing APIs have already access to it, but cc_common.configure_features doesn't. This incompatible change adds a ctx argument to configure_features.
Migration
Instead of:
feature_configuration = cc_common.configure_features(
cc_toolchain = toolchain,
requested_features = ctx.features,
unsupported_features = ctx.disabled_features,
)
write:
feature_configuration = cc_common.configure_features(
ctx = ctx,
cc_toolchain = toolchain,
requested_features = ctx.features,
unsupported_features = ctx.disabled_features,
)
If your rule doesn't depend on cpp fragment yet, you will have to add fragments = ['cpp'] argument to the rule() call.
Metadata
Metadata
Assignees
Labels
P1I'll work on this now. (Assignee required)I'll work on this now. (Assignee required)incompatible-changeIncompatible/breaking changeIncompatible/breaking changeteam-Rules-CPPIssues for C++ rulesIssues for C++ rules