Files
llvm-tms34010/lldb/source/Plugins/ScriptInterpreter/Python
Jonas Devlieghere 119e576302 [lldb] Build liblldb exports from script-interpreter imports (#201392)
With LLDB_ENABLE_DYNAMIC_SCRIPTINTERPRETERS, the script interpreter
plugins are built as standalone shared libraries that resolve their
lldb_private/llvm references through liblldb's re-exports. liblldb was
falling back to liblldb-private.exports, which allowlists the
lldb_private/llvm namespaces wholesale.

Generate the export list per build instead. For each plugin, run llvm-nm
on its compiled objects, keep undefined references in namespaces liblldb
owns, subtract the plugin's own definitions, and concatenate the
per-plugin lists with liblldb.exports.

The plugin's SHARED target LINK_LIBS liblldb, which makes the plugin's
compile order depend on liblldb. Wiring the exports file in via
add_llvm_symbol_exports' built-in target dependency would form a cycle
through that order-only edge. Add NO_TARGET_DEPENDENCY to
add_llvm_symbol_exports so we can apply the file via LINK_DEPENDS alone;
that still triggers a relink when the symbol set changes, without
participating in compile-order tracking.

Windows is unchanged: msvc_extract_private_symbols.py was already doing
per-symbol extraction at namespace granularity.

Assisted-by: Claude
2026-06-04 16:59:18 +00:00
..