Commit Graph

71 Commits

Author SHA1 Message Date
Googler 0d68da5d50 BEGIN_PUBLIC
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
2024-02-23 14:14:27 -08:00
Googler 837caeca75 BEGIN_PUBLIC
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
2024-02-23 13:54:41 -08:00
Googler 916074ec32 BEGIN_PUBLIC
Implement cc_tool
END_PUBLIC

PiperOrigin-RevId: 609307150
Change-Id: I2e135a59e06a56ca8ec071254d340ac4b984b234
2024-02-22 03:06:06 -08:00
Googler 9eb790fe47 BEGIN_PUBLIC
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
2024-02-21 06:24:34 -08:00
Googler 35fe45e91b BEGIN_PUBLIC
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
2024-02-20 17:58:39 -08:00
Googler 2e780ceda9 BEGIN_PUBLIC
Add support for testing rules_cc's new toolchains with rules_testing.
END_PUBLIC

PiperOrigin-RevId: 608769646
Change-Id: I1a698355e5e977cc86eedc7cf6e8e0f888593cb8
2024-02-20 15:54:10 -08:00
Googler db151d0a26 Fix internal breakages for `rules_cc`.
PiperOrigin-RevId: 590620989
Change-Id: I2586ea71b477fc5cb75429f8d839c8818d641e8b
2024-02-09 09:50:57 -08:00
Googler b039a551a7 Fix lexicographical order to make Buildifier happy.
PiperOrigin-RevId: 562719963
Change-Id: I8c50b4606a69d5fedc9dd6b7f9768c2399d86ea3
2023-09-05 03:15:26 -07:00
Googler 1583313f41 Fix licensing errors and add default condition for `local_defines`.
PiperOrigin-RevId: 548995629
Change-Id: I0734ca5b64cf37401ec74a339a67f3044321aa7c
2023-07-18 07:27:57 -07:00
Fabian Meumertzheim 4e72e665a3 Add well-known compiler `config_setting`s
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.
2023-07-10 16:39:33 +02:00
Fabian Meumertzheim f9e3b89332 Enable `//tests/...` in CI 2023-07-08 00:29:45 +02:00
Googler d8dfa8b829 Introduce flag --@rules_cc//:link_extra_libs
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
2023-02-16 04:15:10 -08:00
Googler 991eb349bf Internal change
PiperOrigin-RevId: 340301767
Change-Id: Iccab5010d3fd6e77c08fcdc140cdc1e461185b0d
2020-11-02 13:19:59 -08:00
Googler 699ec52985 Internal change
PiperOrigin-RevId: 339925655
Change-Id: Icde35bf6acb72a382e0253fcf9fb5a10d80a5feb
2020-10-30 13:05:57 -07:00
Googler 16ad606329 Internal change
PiperOrigin-RevId: 339887089
Change-Id: Ic511ced72381f847f5d1b9159f299b6e474a47de
2020-10-30 09:41:38 -07:00
Copybara-Service 53f28aeac9 Merge pull request #79 from agluszak:system_library
PiperOrigin-RevId: 333279551
Change-Id: I6fdf5aca5881b271d30f5acbad48e0c1ae281237
2020-09-23 06:28:04 -07:00
Andrzej Głuszak 8398f4b2c1 Fixes after code review 2020-09-23 11:11:15 +00:00
Andrzej Głuszak c4886cbf16 Add a module description 2020-09-22 11:48:42 +00:00
Andrzej Głuszak d3808499d2 Fix style 2020-09-22 08:18:25 +00:00
Andrzej Głuszak 6c1dbe079d Implement a repository rule for importing system libraries 2020-09-21 17:47:08 +00:00
Googler cfe68f6bc7 Fix immutable frozen set bug in defs.bzl
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
2019-11-29 04:19:02 -08:00