Implement cc_args_list.
It's completely unneccesary to implement it this early, but collecting args lists is also required for cc_feature.
END_PUBLIC
PiperOrigin-RevId: 609833962
Change-Id: I369a929af4280c0a7ebbe2e13159b640c1968209
Pull more info into ArgsListInfo.
This allows us to make queries such as "get me all the flags / files required for this specific action". This will allow us to implement cc_action_config more easily and efficiently.
END_PUBLIC
PiperOrigin-RevId: 609828504
Change-Id: Ie3978674c5027f892d2e5e4c8d937a52c59fde5d
Add support for testing against more complex subject types.
We can now use subjects such as subjects.result(subjects.str) for something that may return a string, or fail.
END_PUBLIC
PiperOrigin-RevId: 608971309
Change-Id: I9ae61c988a597189b84fb6ccef75c96697c6e364
Implement cc_args.
Also change cc_flag_set / cc_flag_group to cc_args / cc_arg_group. This is to lean into the idea that this is roughly equivalent to ctx.actions.args()
END_PUBLIC
PiperOrigin-RevId: 608804069
Change-Id: I74ea883b14219f904aaafc4eab902b96a1fb3e3d
Add support for testing rules_cc's new toolchains with rules_testing.
END_PUBLIC
PiperOrigin-RevId: 608769646
Change-Id: I1a698355e5e977cc86eedc7cf6e8e0f888593cb8
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_setting`s 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.
Also includes minor fixes to `//tests/...` so that it can be enabled in
CI.
Numerous tools override --custom_malloc to add debugging or monitoring runtimes
(see e.g. sanitizers). While this is fine for cases where the tool must also
override malloc to function, in other cases it's simply misuse of
--custom_malloc where no other mechanism exists to link an extra library.
This becomes especially problematic where a runtime library is supposed to be
added in certain configurations that should run in production or other
performance sensitive builds. In these cases, we should _not_ override malloc,
which may also be specified by a cc_binary target. Doing so would introduce
unwanted changes, potentially affecting performance negatively.
This is the @rules_cc counterpart to the equivalent Bazel tools flag
--@bazel_tools//tools/cpp:link_extra_libs. Users that use @rules_cc to build
their C++ projects may use both flags interchangably, however, the @rules_cc
flag should be preferred.
PiperOrigin-RevId: 510103352
Change-Id: Iafccd00ffdb65cb4f953d5acadc451cffc134533
When adding tags to a native cc_library rule that is created through a macro we
were not properly considering the case where the tags came from a different
file and therefore were frozen. This caused an error.
RELNOTES:none
PiperOrigin-RevId: 283039855
Change-Id: Id4cb45675a08ca65196f4f7771abdd5bb0705b79