llvm-project
de4f473f - [lldb] Fix Windows linker error for MakeSBModuleSpec in lldb-server (#181494)

Commit
69 days ago
[lldb] Fix Windows linker error for MakeSBModuleSpec in lldb-server (#181494) ## Summary Move the definition of `ScriptInterpreter::MakeSBModuleSpec` from `ScriptInterpreter.cpp` to `ScriptedPythonInterface.cpp`. `MakeSBModuleSpec` constructs an `SBModuleSpec`, whose symbols live in the API library (`liblldb`). `ScriptInterpreter.cpp` is part of `lldbInterpreter`, which is also linked into `lldb-server` — and `lldb-server` does not link the API library. On Windows, this causes `LNK2019: unresolved external symbol` for `SBModuleSpec`'s constructor and destructor. `ScriptedPythonInterface.cpp` is part of the Python plugin library, which only links into `liblldb` where the API symbols are available. The method retains friend access to `SBModuleSpec` since it is still a member of `ScriptInterpreter` regardless of which `.cpp` file defines it. Fixes Windows linker failure from #181334. ## Test plan - [ ] Existing ScriptedSymbolLocator tests pass Co-authored-by: Rahul Reddy Chamala <rachamal@meta.com>
Author
Parents
Loading