commit | 9f2c62aa489394ae882e07fb97eefb0556075944 | [log] [tgz] |
---|---|---|
author | Googler <noreply@google.com> | Mon Feb 13 04:39:16 2023 -0800 |
committer | Copybara-Service <copybara-worker@google.com> | Mon Feb 13 04:40:42 2023 -0800 |
tree | fe89d37daddefef3f3634e70cbd1c9ddf5677d6e | |
parent | f2ae8f8c04b68e12545c9a6d402a42ac9f1c7dcb [diff] |
Introduce flag --@bazel_tools//tools/cpp: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. To fix abuse of --custom_malloc, add --@bazel_tools//tools/cpp:link_extra_libs, which is similar, but otherwise does not override other runtime libraries. Finally, extra libraries are collected in //tools/cpp:link_extra_lib, which can be used to also introduce libraries based on global configuration rather than via the command line option. PiperOrigin-RevId: 509191255 Change-Id: I932afafed574b0cf5f37a8358f6e12c43f59ba1c
{Fast, Correct} - Choose two
Build and test software of any size, quickly and reliably.
Speed up your builds and tests: Bazel rebuilds only what is necessary. With advanced local and distributed caching, optimized dependency analysis and parallel execution, you get fast and incremental builds.
One tool, multiple languages: Build and test Java, C++, Android, iOS, Go, and a wide variety of other language platforms. Bazel runs on Windows, macOS, and Linux.
Scalable: Bazel helps you scale your organization, codebase, and continuous integration solution. It handles codebases of any size, in multiple repositories or a huge monorepo.
Extensible to your needs: Easily add support for new languages and platforms with Bazel's familiar extension language. Share and re-use language rules written by the growing Bazel community.
Follow our tutorials:
To report a security issue, please email security@bazel.build with a description of the issue, the steps you took to create the issue, affected versions, and, if known, mitigations for the issue. Our vulnerability management team will respond within 3 working days of your email. If the issue is confirmed as a vulnerability, we will open a Security Advisory. This project follows a 90 day disclosure timeline.
See CONTRIBUTING.md