2
0
Fork 0
mirror of https://github.com/bazelbuild/rules_cc synced 2024-11-27 20:43:26 +00:00
Commit graph

13 commits

Author SHA1 Message Date
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 a43f67b72c Automatic code cleanup.
PiperOrigin-RevId: 509526713
Change-Id: I852b1620897d8c6787ca25b6790f245b5bc274f0
2023-02-14 07:49:46 -08:00
Googler 0d68932a68 Automatic code cleanup.
PiperOrigin-RevId: 506908397
Change-Id: I4571c9e947b5878519d5ec291d2fc58566159c84
2023-02-03 08:23:18 -08:00
Fabian Meumertzheim 66cf3048e9 Copybara Merge: https://github.com/bazelbuild/rules_cc/pull/165
BEGIN_PUBLIC
Copybara import of the project:

--
56e69b82484f1a9fb55d8173cc112f9f608f3581 by Fabian Meumertzheim <fabian@meumertzhe.im>:

Simplify WORKSPACE setup and update ancient deps

By removing a single unused `bzl_library` target, rules_cc no longer has
any dependencies that would need to be loaded by a dependency macro. The
existing macro is made a no-op.

The few needed Bazel Federation dependencies are inlined and, in the
case of bazel_skylib and abseil-py, updated to modern versions.

Also reorders `WORKSPACE` to list direct dependencies first and keeps
`MODULE.bazel` in sync with the dependency versions used in WORKSPACE.

The `ubuntu1604` CI pipeline is removed as the version of Python used by
it is no longer supported and the distribution is EOL. Instead, a new
pipeline is added to check the Bzlmod build.

END_PUBLIC

COPYBARA_INTEGRATE_REVIEW=https://github.com/bazelbuild/rules_cc/pull/165 from fmeum:fix-workspace-module 56e69b82484f1a9fb55d8173cc112f9f608f3581
PiperOrigin-RevId: 501245864
Change-Id: Ib71ad910705807a00929a76774387a38d2da0f9f
2023-01-11 04:33:23 -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
Googler 0e66ef31d6 rules_cc: Add top-level BUILD file to distribution.
Before this commit Bazel could not use the distribution since it failed with "Every .bzl file must have a corresponding package, but '@rules_cc//:internal_deps.bzl' does not have one."

https://buildkite.com/bazel/bazel-federation-distro-pre-release-testing/builds/20#29164fc9-b0bb-41aa-b62f-e2f3f20e9efc

PiperOrigin-RevId: 275263945
Change-Id: I12216f2070ddc579f553a22975790bbc9a18f0f9
2019-10-17 08:30:50 -07:00
Googler a508235df9 Add missing bzl files to rules_cc distribution.
PiperOrigin-RevId: 272505874
Change-Id: I68d1b43c859db54abf3da71ce1e11d5c15567257
2019-10-02 13:25:11 -07:00
Copybara-Service f871759081 Merge pull request #35 from fweikert:distro
PiperOrigin-RevId: 272444545
Change-Id: I8d582773c5ef124ecafe77a353434887f1abc1aa
2019-10-02 08:49:43 -07:00
Florian Weikert eae134361b Make Buildifier happy 2019-09-30 15:58:14 +02:00
fweikert 29da92c66c Use rules_pkg for building releases
This commit allows the creation of distributions, with 0.0.1 being the first version.
See distro/README.md for details on how to build a release.

This commit also uses a new version of the Bazel federation that contains rules_pkg 0.2.2 instead of 0.2.1.

There are still some problems with the WORKSPACE stanza that is being printed by the release notes generation script, though:
- It references a //cc:deps.bzl file, which doesn't exist. I have to modify the scripts in rules_pkg to support a flag like 'has_deps'.
- It doesn't support the Bazel federation yet, since it always tells users to download code from the rules_cc repository.
2019-09-17 18:00:18 +02:00
hlopko f37a53e8c9 Internal change
PiperOrigin-RevId: 225221110
2019-01-09 08:56:00 +01:00