From 9fae87a8f82fb93bbd7e2de3d8b6d2acc30b6fb2 Mon Sep 17 00:00:00 2001 From: Tobias Mayer Date: Thu, 5 Oct 2023 15:55:51 +0200 Subject: [PATCH] Make it possible to dlopen libfluent-bit.so The static copy of jemalloc that is included in the distributed fluent-bit binary packages prevents use loading the library at runtime as it is typically done in plugin systems. A slight change to the jemalloc configuration lifts this restriction. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 99109309405..b0eed9acbe4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -920,7 +920,7 @@ if(FLB_JEMALLOC AND ${CMAKE_SYSTEM_NAME} MATCHES "Linux") # Add support for options like page size, if empty we default it if(NOT DEFINED FLB_JEMALLOC_OPTIONS OR "${FLB_JEMALLOC_OPTIONS}" STREQUAL "") - set(FLB_JEMALLOC_OPTIONS "--with-lg-quantum=3") + set(FLB_JEMALLOC_OPTIONS "--with-lg-quantum=3 --disable-initial-exec-tls") endif() # Split into a list so CMake handles it correctly when passing to configure command separate_arguments(FLB_JEMALLOC_OPTIONS_LIST UNIX_COMMAND ${FLB_JEMALLOC_OPTIONS})