Skip to content

Commit 57ebfea

Browse files
committed
[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).
1 parent 864b5b4 commit 57ebfea

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lldb/include/lldb/API/SBDefines.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include "lldb/lldb-types.h"
1616
#include "lldb/lldb-versioning.h"
1717

18+
#ifndef LLDB_API
1819
#if defined(_WIN32)
1920
#if defined(LLDB_IN_LIBLLDB)
2021
#define LLDB_API __declspec(dllexport)
@@ -24,6 +25,7 @@
2425
#else // defined (_WIN32)
2526
#define LLDB_API
2627
#endif
28+
#endif
2729

2830
// Forward Declarations
2931
namespace lldb {

0 commit comments

Comments
 (0)