You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by sw...@apache.org on 2024/02/01 03:06:07 UTC
(logging-log4cxx) 01/01: Optimize relocation processing when loading liblog4cxx.so
This is an automated email from the ASF dual-hosted git repository.
swebb2066 pushed a commit to branch reduce_dynamic_linking_overhead
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit 2ad0693aff8834bb3e4efb5a0b41820878b3006e
Author: Stephen Webb <sw...@gmail.com>
AuthorDate: Thu Feb 1 14:05:45 2024 +1100
Optimize relocation processing when loading liblog4cxx.so
---
src/main/cpp/CMakeLists.txt | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/main/cpp/CMakeLists.txt b/src/main/cpp/CMakeLists.txt
index 616de883..e19a619e 100644
--- a/src/main/cpp/CMakeLists.txt
+++ b/src/main/cpp/CMakeLists.txt
@@ -22,6 +22,10 @@ option(LOG4CXX_ABI_CHECK "Check for ABI changes" OFF)
add_library(log4cxx)
if(BUILD_SHARED_LIBS)
target_compile_definitions(log4cxx PRIVATE LOG4CXX)
+ if(NOT WIN32)
+ # Make defined symbols non-preemptible, which can optimize relocation processing
+ target_link_options(log4cxx PRIVATE "LINKER:-Bsymbolic")
+ endif()
else()
target_compile_definitions(log4cxx PUBLIC LOG4CXX_STATIC)
endif()