Skip to content

Disable legacy C++ configuration API #6380

Closed

Description

@hlopko

Incompatible change.

This turns off legacy Starlark access to cc toolchain information via the ctx.fragments.cpp fragment. Instead of declaring dependency on the ctx.fragments.cpp using the fragments attribute declare a dependency on the @bazel_tools//tools/cpp:current_cc_toolchain via implicit attribute named _cc_toolchain (see example in the full migration docs). Use find_cpp_toolchain from @bazel_tools//tools/cpp:toolchain_utils.bzl to get the current C++ toolchain in the rule implementation.

full migration docs

Activity

  1. added
    team-Rules-CPP
    incompatible-change
    on Oct 15, 2018
  2. self-assigned this
    on Oct 15, 2018
  3. hlopko commented on Oct 23, 2018

    @hlopko
    MemberAuthor

    Flag is flipped, therefore closing the issue.

  4. added a commit that references this issue on Oct 29, 2018
  5. added a commit that references this issue on Nov 1, 2018
  6. sgreenstein commented on Nov 2, 2018

    @sgreenstein
    Contributor

    I was going through the docs following the example to migrate to the new recommended way. I kept running into an issue, and finally noticed that --incompatible_disable_legacy_flags_cc_toolchain_api breaks the example.

    It's confusing to me that the example solution to one deprecation is also deprecated

    Please change the example to use the non-deprecated method or add a note that the other deprecation should also be considered

  7. hlopko commented on Nov 28, 2018

    @hlopko
    MemberAuthor

    Hi Seth,

    sorry for the trouble, I'll submit a fix shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

incompatible-changeteam-Rules-CPP

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions