| Issue |
242739
|
| Summary |
[bazel][libc] Build libc sysroot static archives
|
| Labels |
libc,
bazel
|
| Assignees |
|
| Reporter |
jtstogel
|
This issue tracks adding support in Bazel for producing static archives in the LLVM-libc sysroot (`libc.a`, `libm.a`, etc).
Currently, LLVM-libc release libraries in Bazel are produced by [`libc_release_library`](https://github.com/llvm/llvm-project/blob/f247014dd066974d76cc7dace4b4b0f49e27f5e6/utils/bazel/llvm-project-overlay/libc/libc_build_rules.bzl#L248). This macro is somewhat involved: it walks the entire dependency tree via an [aspect](https://github.com/llvm/llvm-project/blob/f247014dd066974d76cc7dace4b4b0f49e27f5e6/utils/bazel/llvm-project-overlay/libc/libc_build_rules.bzl#L171) to find the transitive closure of all headers and sources to compile. It then re-compiles them under a consistent set of [release copts](https://github.com/llvm/llvm-project/blob/f247014dd066974d76cc7dace4b4b0f49e27f5e6/utils/bazel/llvm-project-overlay/libc/libc_build_rules.bzl#L57). This is useful, since it lets us produce a release library with new `copts` and export one `libc.a`/`libc.so` interface.
However, `libc_release_library` does not support mutiple distinct sets of `copts`, which is required by the LLVM-libc fullbuild (some objects, like [`tls`](https://github.com/llvm/llvm-project/blob/e5009d8acf2c25e1e020d7f781bf0c2d3431042a/libc/src/__support/threads/linux/x86_64/CMakeLists.txt#L16), need special handling).
We'll need some way to produce LLVM-libc static archives built under release compiler options.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs