Skip to content

Commit e286bfd

Browse files
committed
fix: restore extern C++ and fix POSIX header collection for modules
1 parent 6ec642a commit e286bfd

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

cmake/templates/hpx.ixx.in

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ module;
1818
// violations.
1919
#include <hpx/config/std_headers.hpp>
2020

21-
#if !defined(__ANDROID__) && !defined(ANDROID) && !defined(__APPLE__)
22-
#include <link.h>
23-
#endif
24-
#include <dlfcn.h>
25-
2621
export module HPX.@cap_libname@;
2722

23+
// Make sure the exported symbols are name-mangled using standard C++ rules.
24+
// This is necessary as otherwise the symbols exported from the shared libraries
25+
// will be exported from the module using a differently encoded name.
26+
extern "C++" {
27+
2828
#if defined(HPX_MSVC)
2929
// disable warning C5244: '#include <filename>' in the purview of module
3030
// 'HPX.@cap_libname@' appears erroneous. Consider moving that directive before the
@@ -51,3 +51,5 @@ export module HPX.@cap_libname@;
5151
#if defined(HPX_MSVC)
5252
#pragma warning(pop)
5353
#endif
54+
55+
} // extern "C++"

0 commit comments

Comments
 (0)