[lldb] Remove the requirement for windows clients to specify -DIMPORT_LIBLLDB
authorPavel Labath <pavel@labath.sk>
Tue, 18 Jan 2022 15:15:10 +0000 (16:15 +0100)
committerPavel Labath <pavel@labath.sk>
Wed, 19 Jan 2022 11:49:47 +0000 (12:49 +0100)
commitb2a162e63bd735742fa22ed8d2465095db386bad
tree6f4f8e62dfe978eab4367a8e1b88c3629a7318e1
parent8bfa7a6dcc274bf46ce1587cf51996a3389ceb63
[lldb] Remove the requirement for windows clients to specify -DIMPORT_LIBLLDB

This macro was being used to select the proper import/export annotations
on SB classes. Non-windows clients do not have such requirements.

Instead introduce a new macro (LLDB_IN_LIBLLDB), which signals that
we're compiling liblldb itself (and should use dllexport). The default
(no macro) is to use dllimport. I've moved the macro definition to
SBDefines.h, since it only makes sense when building the API library.

Differential Revision: https://reviews.llvm.org/D117564
lldb/include/lldb/API/SBDefines.h
lldb/include/lldb/lldb-defines.h
lldb/source/API/CMakeLists.txt
lldb/tools/driver/CMakeLists.txt
lldb/tools/lldb-vscode/CMakeLists.txt