Skip to content

incompatible_require_ctx_in_configure_features: Require ctx argument in cc_common.configure_features #7793

Closed

Description

@hlopko

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.

Activity

  1. added
    P1
    team-Rules-CPP
    incompatible-change
    on Mar 21, 2019
  2. self-assigned this
    on Mar 21, 2019
  3. 53 remaining items

  4. added a commit that references this issue on Jul 4, 2019
  5. added a commit that references this issue on Jul 8, 2019
  6. added a commit that references this issue on Sep 5, 2019
  7. added a commit that references this issue on Oct 9, 2019
  8. added a commit that references this issue on Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1incompatible-changeteam-Rules-CPP

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions