Fix CI: Filter depend API symbols from exports when depend_api=false

The depend API follows the same pattern as experimental_api: the code
is always compiled (guarded by #ifdef HB_DEPEND_API), but symbols
should only be exported when the option is enabled.

Changes:
1. gen-def.py: Add --depend-api flag and filter list (like --experimental-api)
2. src/meson.build: Pass --depend-api flag when option is enabled

This ensures depend symbols are excluded from .def files when depend_api=false
(the CI default), fixing macOS check-symbols test failures.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Skef IterumandClaude committed 2026-06-05 15:09:11 -07:00
1 parent 3648c61cb0
commit ec97c40d5f
3 files changed
+52 -22

No files matched your search

+11
View File
@@ -27,6 +27,17 @@ hb_subset_cff2_get_charstring_data
hb_subset_cff2_get_charstrings_index
""".splitlines ()
symbols = [x for x in symbols if x not in experimental_symbols]
if '--depend-api' not in sys.argv:
# Depend API symbols - only included when depend_api=true
depend_symbols = \
"""hb_depend_from_face_or_fail
hb_depend_get_glyph_entry
hb_depend_get_set_from_index
hb_depend_print
hb_depend_destroy
""".splitlines ()
symbols = [x for x in symbols if x not in depend_symbols]
symbols = "\n".join (symbols)
result = symbols if os.getenv ('PLAIN_LIST', '') else """EXPORTS
+3
View File
@@ -630,6 +630,9 @@ gen_def_cmd = [gen_def, '@OUTPUT@', '@INPUT@']
if get_option('experimental_api')
gen_def_cmd += '--experimental-api'
endif
if get_option('depend_api')
gen_def_cmd += '--depend-api'
endif
# harfbuzz
harfbuzz_def = custom_target('harfbuzz.def',