|author||Googler <firstname.lastname@example.org>||Wed Feb 19 02:22:26 2020 -0800|
|committer||Copybara-Service <email@example.com>||Wed Feb 19 02:22:42 2020 -0800|
Remove attribute for visibility file. The same command line can be obtained with the attributes user_link_flags and additional_linker_inputs used together. In the first design iterations of cc_shared_library it was decided to have the visibility_file attribute so that a cc_shared_library could be used for many different platforms smoothly. For this to work the visibility file would have had to be platform neutral and then Bazel would have had to write a visibility file specific for each platform, e.g. the version script for Unix and the exports map for Windows. However, in the last approved design it was decided not to have Bazel get in the business of understanding symbols and automatically writing export maps. With this approach, it then became necessary for people to use selects() in the visibility_file attribute depending on the platform that the file was for. Since we have added a new way to add files with the attribute additional_linker_inputs and we need selects() anyway, it doesn't make sense to keep the visibility_file attribute, the same can be achieved with selects in the other two attributes mentioned. In any case, if this can be made more ergonomic in the future, we can do so. However, removing this attribute after flipping the experimental flag would be an incompatible change. PiperOrigin-RevId: 295925566 Change-Id: I52733e006f4b0f79f50380e89fc2eeae58dbad4d
This repository contains Starlark implementation of C++ rules in Bazel.
The rules are being incrementally converted from their native implementations in the Bazel source tree.
For the list of C++ rules, see the Bazel documentation.
There is no need to use rules from this repository just yet. If you want to use
rules_cc anyway, add the following to your
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "rules_cc", urls = ["https://github.com/bazelbuild/rules_cc/archive/TODO"], sha256 = "TODO", )
Then, in your
BUILD files, import and use the rules:
load("@rules_cc//cc:defs.bzl", "cc_library") cc_library( ... )
This repository also contains migration tools that can be used to migrate your project for Bazel incompatible changes.
bazel run @rules_cc//tools/migration:legacy_fields_migrator -- \ --input=my_toolchain/CROSSTOOL \ --inline
rules_cc are the work of many contributors. We appreciate your help!
To contribute, please read the contribution guidelines: CONTRIBUTING.md.
Note that the
rules_cc use the GitHub issue tracker for bug reports and feature requests only. For asking questions see: