[lldb] Surround LLDB_API-defining code with #ifndef LLDB_API

This enables power-users to annotate lldb api functions with arbitrary
attributes. The motivation for this is being able to build liblldb as a
static library on windows (see discussion on D117564).

This should not be interpreted to mean that building liblldb is
supported in any way, but this does not cause any problems for us, and
can help users who really know what they are doing (or have no other
choice).
This commit is contained in:
Pavel Labath
2022-01-20 20:36:14 +01:00
parent 864b5b49fd
commit 57ebfea38c

View File

@@ -15,6 +15,7 @@
#include "lldb/lldb-types.h"
#include "lldb/lldb-versioning.h"
#ifndef LLDB_API
#if defined(_WIN32)
#if defined(LLDB_IN_LIBLLDB)
#define LLDB_API __declspec(dllexport)
@@ -24,6 +25,7 @@
#else // defined (_WIN32)
#define LLDB_API
#endif
#endif
// Forward Declarations
namespace lldb {