Re:0+0 > 0: C++ thread-local storage performance
by smeenai on Monday February 17, 2025 @05:04PM
(#43083731)
Idk about Bazel, but Buck2 (and Buck1, but 2 is better in every way) does handle adding -fPIC for shared libraries and leaving it off when statically linking. Each library has a PIC and non-PIC version, and the appropriate one is selected depending on if the library is being linked into an executable or a shared library. (The versions are only built when needed.) I don't remember if it also handles -fPIE similarly smartly though if you do want position-independent executables.
[ Parent
| on HN ]
There are no comments on this comment yet.