Repository navigation
build(libobs): per-module hidden-symbol fragments, generated linker lists (#3233) - #3248
Conversation
…enerate the linker lists (#3233) [GREEN] rust-hidden.txt becomes libobs/cmake/rust-hidden.d/<crate>-<ffi module>.txt (132 fragments) plus rust-hidden-base.txt for Rust runtime patterns, C glue and the macOS-only compiler-rt helpers. libobs/cmake/rust-hidden.cmake generates rust-exports.map and rust-unexports-macos.txt into the build tree at configure time (also runnable with cmake -P); rust/obs-build writes the same lists. The committed .map and macOS list are gone. Rebased onto master after #3165 and #3227: their eight new hidden shims moved into the per-module fragments (obs-graphics-effect_param_types.txt, obs-core-audio_mix.txt), so the generated sets still equal master's old lists exactly. ci_scope: a rust-hidden.d fragment edit is Linux only; the mirrored-lists rule (#2288) and its test are removed. export_list.rs reads the fragments and checks each names only its own module's shims. Refs #3233, #3232
f8c97f5 to
5709c0f
Compare
zackees
left a comment
There was a problem hiding this comment.
Coordinator review: I checked that nothing was dropped. Taken together, rust-hidden-base.txt and every rust-hidden.d/*.txt fragment (after removing comments, blank lines and duplicates) contain all 825 entries of master's rust-hidden.txt. The 7 extra entries (_R*, rust_eh_personality, base_default_log_handler, base_log_literal, obs_data_json_decref, __is*VersionAtLeast) all come from master's rust-exports.map and rust-unexports-macos.txt, so the base file is the union of the three old lists, as intended. One fragment per FFI module removes the shared-list conflicts that keep causing rebases. Restricting a fragment-only change to Linux in ci_scope.py is safe because Windows reads none of these files, though macOS does via the generated ld64 list. Check that a fragment-only change still selects the macOS Rust lane, or document why it doesn't need to. No other findings.
Refs #3233, #3232
The three shared hidden-symbol lists are gone. A port now edits only its own fragment, and that edit runs CI on Linux only.
libobs/cmake/rust-hidden.d/<crate>-<ffi module>.txt: 132 fragments split out ofrust-hidden.txt, plain names only, the same layout asrust-exports.d/.libobs/cmake/rust-hidden-base.txt: Rust runtime patterns (_ZN*,_R*,rust_eh_personality), the C glue that was missing fromrust-hidden.txt(base_default_log_handler,base_log_literal,obs_data_json_decref) and__is*VersionAtLeast macos. This file is still shared, but it rarely changes.libobs/cmake/rust-hidden.cmakegeneratesrust-exports.mapandrust-unexports-macos.txtinto the build tree at configure time, including the HEVC-off names. It also runs withcmake -P.rust/obs-build(Linux and macOS) writes the same lists.local:names, 832 ld64 lines, no duplicates; verified set-for-set after the rebase). Comments and ordering differ; linkers ignore both.obs-graphics-effect_param_types.txt,obs-core-audio_mix.txt) instead of the deleted shared lists.ci/ci_scope.py:rust-hidden.d/*.txtis Linux only. The ci: Front-load build-system and test changes per subsystem so port PRs run Linux-only #2288 mirrored-lists rule andci/test_hidden_symbol_scope.pyare removed.export_list.rsreads the fragments and checks that each one names only shims of its own module..dREADMEs are updated. Rust doc comments now point torust-hidden.d.RED 905bac3:
ci/test_hidden_symbol_fragments.pyfails 3 and errors 4 of 9: the shared lists still exist, the fragments and generator are missing, and a fragment edit selects macOS and Windows.GREEN 5ad38e7: 9/9 OK,
test_ci_scope54/54 OK.Tiers: no port and no C behavior change, so Tiers 1-4 do not apply. Visibility stays the same because the generated symbol sets equal the old ones.