Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: include -fno-semantic-interposition in CXXFLAGS
when building the shared libraries, `-fnosematntic-interposition` option can be used to improve the performance of the shared libraries, if interposition of exported symbol is not allowed. by default, GCC respects the symbol interposition semantics defined by the ELF specification. but if we want to have a better performance for the shared libraries, and we don't want to override the exported symbols with, for instance, `LD_PRELOAD`, we can safely disable this behavior for better performance. as the interposition semantics prevents compiler from doing further optimizations like inlining. GCC only disables this when building with `-Ofast`, see gcc-mirror/gcc@458d2c6. Clang just disables this behavior by default. see llvm/llvm-project@d1fd723. so, in order to have better performance when building shared libraries, let's just disable the interposition semantics. this change should have no impact on the Seastar static libraries, but it can improve the performance of the shared libraries. Signed-off-by: Kefu Chai <[email protected]>
- Loading branch information