Hide vendored HarfBuzz symbols on Apple (#4263)

This commit is contained in:
Sargun Vohra
2026-05-26 08:28:34 -07:00
committed by GitHub
parent d20b369af0
commit b53ac1b891
2 changed files with 13 additions and 0 deletions

7
vendor/BUILD.bazel vendored
View File

@@ -722,6 +722,13 @@ cc_library(
# "HB_NO_WIN1256",
"HB_TINY",
],
# Keep bundled HarfBuzz symbols private so they do not interpose symbols from
# app dependencies. See https://github.com/maplibre/maplibre-native/issues/3777.
copts = select({
"@platforms//os:ios": ["-fvisibility=hidden"],
"@platforms//os:macos": ["-fvisibility=hidden"],
"//conditions:default": [],
}),
includes = [
"freetype/include",
"harfbuzz/src",

View File

@@ -15,6 +15,12 @@ if (MLN_TEXT_SHAPING_HARFBUZZ)
target_include_directories(mbgl-harfbuzz PRIVATE ${CMAKE_CURRENT_LIST_DIR}/freetype/include)
target_compile_definitions(mbgl-harfbuzz PRIVATE -DHAVE_FREETYPE)
if(APPLE)
# Keep bundled HarfBuzz symbols private so they do not interpose symbols from
# app dependencies. See https://github.com/maplibre/maplibre-native/issues/3777.
target_compile_options(mbgl-harfbuzz PRIVATE -fvisibility=hidden)
endif()
set_target_properties(
mbgl-harfbuzz
PROPERTIES