mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-06 19:38:41 +03:00
Avoid unnecessary symbol exposure with ELF-based systems
GCC's default visibility is "public" but can be changed to "hidden" with the argument "-fvisibility=hidden". Tested with x86_64 / Ubuntu Linux 18.04 LTS: [before] $ nm -g -C libmimalloc.so | grep "T " | wc -l 142 [after] $ nm -g -C libmimalloc.so | grep "T " | wc -l 93 This patch does not change the build on macOS.
This commit is contained in:
parent
91cb4cee8a
commit
256eb97849
2 changed files with 10 additions and 1 deletions
|
@ -82,6 +82,7 @@ if(CMAKE_C_COMPILER_ID MATCHES "AppleClang|Clang|GNU")
|
|||
list(APPEND mi_cflags -Wall -Wextra -Wno-unknown-pragmas -ftls-model=initial-exec)
|
||||
if(CMAKE_C_COMPILER_ID MATCHES "GNU")
|
||||
list(APPEND mi_cflags -Wno-invalid-memory-model)
|
||||
list(APPEND mi_cflags -fvisibility=hidden)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue