[all-commits] [llvm/llvm-project] c388da: [libc][bazel] Simplify libc_build_rules by groupin...
Alexey Samsonov via All-commits
all-commits at lists.llvm.org
Mon Jan 6 11:33:05 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c388da6ed38ba8892edb90803b76bcfe759fe3cf
https://github.com/llvm/llvm-project/commit/c388da6ed38ba8892edb90803b76bcfe759fe3cf
Author: Alexey Samsonov <vonosmas at gmail.com>
Date: 2025-01-06 (Mon, 06 Jan 2025)
Changed paths:
M utils/bazel/llvm-project-overlay/libc/libc_build_rules.bzl
Log Message:
-----------
[libc][bazel] Simplify libc_build_rules by grouping release copts (#121630)
Extract all compiler options used to build "release" versions of libc
API functions into a separate helper function, instead of burying this
logic inside libc_function() macro.
With this change, we further split two "flavors" of cc_library()
produced for each libc public function:
* `<function>.__internal__` library used in unit tests is *not* built
with release copts and is thus indistinguishable from regular
libc_support_library(). Arguably, it's a good thing, because all sources
in a unit test are built with the same set of compiler flags, instead of
"franken-build" when a subset of sources is always built with -O3. If a
user needs to run the tests in optimized mode, they should really be
using Bazel invocation-level compile flags instead.
* `<function>` library that libc users can use to construct their own
static archive *is* built with the same release copts as before. There
is a pre-existing problem that its libc_support_library() dependencies
are not built with the same copts. We're not addressing it here now.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list