Skip to content

Commit 7a1f56f

Browse files
committed
fix dllexport
windows builds fails because of inconsistent dll linkage. Change-Id: Ife7fdfaec77fb5b49ce388c8934ebea66901d40d Signed-off-by: Shankar Easwaran <[email protected]>
1 parent d922832 commit 7a1f56f

File tree

3 files changed

+4
-14
lines changed

3 files changed

+4
-14
lines changed

test/Common/Plugin/FindConfigFile/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ if(NOT CYGWIN AND LLVM_ENABLE_PIC)
1010
add_llvm_library(findconfig ${SHARED_LIB_SOURCES} LINK_LIBS
1111
LW)
1212

13-
target_compile_definitions(findconfig PRIVATE IN_DLL)
14-
1513
set(BUILD_SHARED_LIBS ${bsl})
1614

1715
endif()

test/Common/Plugin/MissingINIFile/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ if(NOT CYGWIN AND LLVM_ENABLE_PIC)
99

1010
add_llvm_library(missinginifile ${SHARED_LIB_SOURCES} LINK_LIBS LW)
1111

12-
target_compile_definitions(missinginifile PRIVATE IN_DLL)
13-
1412
set(BUILD_SHARED_LIBS ${bsl})
1513

1614
endif()

test/Common/Plugin/MissingINIFile/MissingINIFile.cpp

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,9 @@
44
#include "PluginVersion.h"
55
#include <string>
66

7-
#ifdef _WIN32
8-
#define DLL_EXPORT __declspec(dllexport)
9-
#else
10-
#define DLL_EXPORT
11-
#endif
12-
137
using namespace eld::plugin;
148

15-
class DLL_EXPORT MissingINIFile : public OutputSectionIteratorPlugin {
9+
class DLL_A_EXPORT MissingINIFile : public OutputSectionIteratorPlugin {
1610

1711
public:
1812
MissingINIFile() : OutputSectionIteratorPlugin("MissingINIFile") {}
@@ -59,14 +53,14 @@ class DLL_EXPORT MissingINIFile : public OutputSectionIteratorPlugin {
5953
MissingINIFile *ThisPlugin = nullptr;
6054

6155
extern "C" {
62-
bool DLL_EXPORT RegisterAll() {
56+
bool DLL_A_EXPORT RegisterAll() {
6357
ThisPlugin = new MissingINIFile();
6458
return true;
6559
}
6660

67-
Plugin DLL_EXPORT *getPlugin(const char *T) { return ThisPlugin; }
61+
Plugin DLL_A_EXPORT *getPlugin(const char *T) { return ThisPlugin; }
6862

69-
void DLL_EXPORT Cleanup() {
63+
void DLL_A_EXPORT Cleanup() {
7064
if (ThisPlugin)
7165
delete ThisPlugin;
7266
}

0 commit comments

Comments
 (0)