llvm / llvm/llvm-project

Building liblldb.lib for windows

Open
#168,904 4 comments 0 reactions 0 assignees View on GitHub
lldb
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

Hi. I uses LLDB C++ API in my program, example:
```
SBAttachInfo attach_info = SBAttachInfo(pid);
target = lldb_debugger.CreateTarget(nullptr);

listener = lldb_debugger.GetListener();
SBBroadcaster broadcaster = target.GetBroadcaster();
broadcaster.AddListener(listener,
SBProcess::eBroadcastBitStateChanged | SBProcess::eBroadcastBitStructuredData);

broadcaster.AddListener(listener,
SBTarget::eBroadcastBitModulesLoaded |
SBTarget::eBroadcastBitModulesUnloaded |
SBTarget::eBroadcastBitBreakpointChanged |
SBTarget::eBroadcastBitSymbolsLoaded);

process = target.Attach(attach_info, error);
```
and to compile the program i need liblldb.lib file, because i have these errors
`a reference to an unresolved external character "__declspec(dllimport) public: __cdecl lldb::SBError::SBError(void)" (__imp_??0SBError@lldb@@QEAA@XZ) in the function "public: virtual __int64 __cdecl my_debugger_t::on_event(__int64,char *)" (?on_event@my_debugger_t@@UEAA_J_JPEAD@Z).`

This lib exists in clang+llvm-18.1.8-x86_64-pc-windows-msvc release and my program compiles without errors, but i need to use version, which optimized for android.
For building i use these commands
```
mkdir llvm-toolchain && cd llvm-toolchain
repo init -u https://android.googlesource.com/platform/manifest -b llvm-toolchain
repo sync -c
python toolchain/llvm_android/build.py
```
The build was successful (based on https://github.com/llvm/llvm-project/commits/3c92011b600bdf70424e2547594dd461fe411a41) for windows. It has exe files, but doesn't have .lib files in lib library, only .a files. And i can't use this build with my project.
What building flags i need to change? Thank you!

Image

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.