Use -ftls-model=initial-exec with maxscale-common
Resolving the relocations right at startup reduces the cost of using thread-local variables.
This commit is contained in:
parent
944ee3d977
commit
08dd55a26a
@ -81,6 +81,10 @@ if (HAVE_LIBDL)
|
||||
target_link_libraries(maxscale-common dl)
|
||||
endif()
|
||||
|
||||
# Using initial-exec instead of the default global-dynamic tls-model
|
||||
# reduces the cost of using thread-local variables in dynamic libraries.
|
||||
target_compile_options(maxscale-common PUBLIC "-ftls-model=initial-exec")
|
||||
|
||||
add_dependencies(maxscale-common pcre2 connector-c libmicrohttpd jansson maxbase)
|
||||
set_target_properties(maxscale-common PROPERTIES VERSION "1.0.0")
|
||||
install_module(maxscale-common core)
|
||||
|
Loading…
x
Reference in New Issue
Block a user