Restore cmake hidden compile symbol visibility (#3796)

This was originally fixed in #3655, but regressed in #3762 which removed
the `-fvisibility=hidden` flag from the CMakeLists.txt file.

This also removes extraneous ending whitespace from the file.
This commit is contained in:
Benbuck Nason 2024-09-17 19:24:30 -07:00 committed by GitHub
parent 79e695e1a3
commit e9cc8731da
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -124,7 +124,8 @@ include (${WAMR_ROOT_DIR}/build-scripts/runtime_lib.cmake)
if (NOT WIN32)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wformat -Wformat-security \
-ffunction-sections -fdata-sections \
-Wno-unused-parameter -Wno-pedantic")
-Wno-unused-parameter -Wno-pedantic \
-fvisibility=hidden")
# Remove the extra spaces for better make log
string (REGEX REPLACE " *" " " CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wformat -Wformat-security -Wno-unused")