commit | 9aea806f9cde6bfcff48027d26b4588225bfc194 | [log] [tgz] |
---|---|---|
author | Googler <noreply@google.com> | Tue Jan 12 07:02:03 2021 -0800 |
committer | Copybara-Service <copybara-worker@google.com> | Tue Jan 12 07:02:57 2021 -0800 |
tree | 44dd014b0b5dba151290456b8002df01af7a8f58 | |
parent | acc1e0f747f14d1cac571890f97fa6c494344797 [diff] |
Implement alwayslink behavior for object_file_group artifacts. The current implementation of alwayslink for object_file_group artifacts is incorrect, based on the assumption that `-whole-archive --start-lib <objects> -no-whole-archive --end-lib` is equivalent to `<objects>`. Although --start-lib/--end-lib flags do give objects archive-like resolution behavior, -whole-archive/-no-whole-archive only apply to static libraries. Therefore, all object_file_group artifacts are currently being linked with archive-like resolution behavior. To correctly achieve alwayslink behavior with object groups, it suffices to leave out the --start-lib/--end-lib flags, so that the object files are received with their ordinary, alwayslink behavior. In addition to implementing alwayslink behavior, this CL also restricts applications of -whole-archive/-no-whole-archive to static libraries. This produces no change in behavior. PiperOrigin-RevId: 351362941
{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:
See CONTRIBUTING.md