bazelbuild / rules_cc

C++ Rules for Bazel
https://bazel.build
Apache License 2.0
181 stars 89 forks source link

Add well-known compiler `config_setting`s #167

Closed fmeum closed 1 year ago

fmeum commented 1 year ago

As of Bazel 6.0.0, all Bazel-provided toolchains report consistent compiler names that can be matched on with select. Having a central place for config_settings that can be used for this purpose makes it so that rulesets don't have to define them themselves and moving the compiler flag out of @bazel_tools becomes easier as it is no longer referenced directly.

Fixes https://github.com/bazelbuild/bazel/issues/14914

fmeum commented 1 year ago

~Stacked on #163 to get the tests to pass - the diverged toolchain definitions did not contain the correct compiler names.~

fmeum commented 1 year ago

@oquenchil No longer stacked.

fmeum commented 1 year ago

@buildbreaker2021 The automated release to the Bazel Central Registry didn't work. Quoting @kormide:

Hey, it's because buildbreaker2021 published the release but they don't have a fork of bazel-central-registry with the app installed on it. It wasn't able to send them an email because their email isn't listed publicly on their github profile.

buildbreaker2021 commented 1 year ago

Yes I am aware of that will try to push it to central registry manually today.