Skip to content

incompatible_disable_legacy_cc_provider: Deprecate old C++ Starlark provider API #7036

@oquenchil

Description

@oquenchil

Flag: --incompatible_disable_legacy_cc_provider
Available since: 0.22 (January 2019 release)
Will be flipped in: 0.25 (March 2019 release)
Tracking issue: #4570

This is a tracking issue for the removal of the legacy C++ Starlark provider.

We are deprecating this old API in favor of the new C++ Starlark API that will be fully supported in the future and will provide more functionality than this deprecated API.

Migration instructions

Replacements:

Old API New API
dep.cc.transitive_headers dep[CcInfo].compilation_context.headers
dep.cc.defines dep[CcInfo].compilation_context.defines.to_list()
dep.cc.system_include_directories dep[CcInfo].compilation_context.system_includes.to_list()
dep.cc.include_directories dep[CcInfo].compilation_context.includes.to_list()
dep.cc.quote_include_directories dep[CcInfo].compilation_context.quote_includes.to_list()
dep.cc.link_flags dep[CcInfo].linking_context.user_link_flags
dep.cc.libs get_libs_for_static_executable(dep)
dep.cc.compile_flags get_compile_flags(dep)

For the methods get_libs_for_static_executable and get_compile_flags, see as an example: https://gist.github.com/oquenchil/7e2c2bd761aa1341b458cc25608da50c

Metadata

Metadata

Assignees

Labels

P1I'll work on this now. (Assignee required)incompatible-changeIncompatible/breaking changeteam-Rules-CPPIssues for C++ rules

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions