[libcxx-commits] [PATCH] D104328: [libc++] Always build libc++ and libc++abi with -fPIC
Martin Storsjö via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jun 16 00:51:36 PDT 2021
mstorsjo added a comment.
> Furthermore, there is apparently basically no downside to building the libraries with position independent code, since modern toolchains are sufficiently clever.
FWIW it's not necessarily so much about modern toolchains, as it is about modern architectures. AFAIK position independent code is measurably less efficient on e.g. i386, while the overhead on e.g. x86_64 and arm64 is much much smaller (possibly also on 32 bit arm). Therefore I think the other patch (D104327 <https://reviews.llvm.org/D104327>) makes more sense out of these two, as the choice of PIC is more of a choice for how one configures and distributes it, than an intrinsic property of the project itself.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104328/new/
https://reviews.llvm.org/D104328
More information about the libcxx-commits
mailing list