Skip to content

build(libobs): per-module hidden-symbol fragments, generated linker lists (#3233) - #3248

Merged
zackees merged 3 commits into
masterfrom
build/3233-symbol-fragments
Oct 31, 2026
Merged

zackees merged 3 commits into
masterfrom
build/3233-symbol-fragments

Conversation

@zackees

@zackees zackees commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

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 of rust-hidden.txt, plain names only, the same layout as rust-exports.d/.
  • libobs/cmake/rust-hidden-base.txt: Rust runtime patterns (_ZN*, _R*, rust_eh_personality), the C glue that was missing from rust-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.cmake generates rust-exports.map and rust-unexports-macos.txt into the build tree at configure time, including the HEVC-off names. It also runs with cmake -P. rust/obs-build (Linux and macOS) writes the same lists.
  • Equivalence: the generated outputs have the same symbol sets as master's deleted files (831 ELF local: names, 832 ld64 lines, no duplicates; verified set-for-set after the rebase). Comments and ordering differ; linkers ignore both.
  • Rebased onto master after obs-graphics: Port the effect parameter types #3165 and perf(audio-mix): add only into the active mixes (#3189) #3227: their eight new hidden shims moved into the per-module fragments (obs-graphics-effect_param_types.txt, obs-core-audio_mix.txt) instead of the deleted shared lists.
  • ci/ci_scope.py: rust-hidden.d/*.txt is Linux only. The ci: Front-load build-system and test changes per subsystem so port PRs run Linux-only #2288 mirrored-lists rule and ci/test_hidden_symbol_scope.py are removed.
  • export_list.rs reads the fragments and checks that each one names only shims of its own module.
  • Docs: testing-policy and both .d READMEs are updated. Rust doc comments now point to rust-hidden.d.

RED 905bac3: ci/test_hidden_symbol_fragments.py fails 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_scope 54/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.

…#3233) [RED]

Fails: the three shared lists still exist, rust-hidden.d/ and the
generator are missing, and a fragment edit selects macOS and Windows.

Refs #3233, #3232
…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
@zackees
zackees force-pushed the build/3233-symbol-fragments branch from f8c97f5 to 5709c0f Compare October 31, 2026 19:56
@zackees
zackees marked this pull request as ready for review October 31, 2026 20:01

@zackees zackees left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@zackees
zackees added this pull request to the merge queue Oct 31, 2026
Merged via the queue into master with commit b65cbc6 Oct 31, 2026
40 checks passed
@zackees
zackees deleted the build/3233-symbol-fragments branch October 31, 2026 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant