Skip to content

Commit 4bc1bbe

Browse files
Albert Ziegenhagelisuruf
authored andcommitted
Set WINDOWS_EXPORT_ALL_SYMBOLS property for for shared flangrti target.
This works around the issue with missing __declspec(dllexport/dllimport) declerations in the source files.
1 parent 242de33 commit 4bc1bbe

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

runtime/flangrti/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,10 @@ set_target_properties(flangrti_shared flangrti_static
140140
PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${FLANG_RTE_LIB_DIR})
141141

142142
if (NOT MSVC)
143-
target_compile_options(flangrti_static PRIVATE -fPIC)
144-
target_compile_options(flangrti_shared PRIVATE -fPIC)
143+
target_compile_options(flangrti_static PRIVATE -fPIC)
144+
target_compile_options(flangrti_shared PRIVATE -fPIC)
145+
else()
146+
set_target_properties(flangrti_shared PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
145147
endif()
146148

147149
target_compile_options(flangrti_static PUBLIC $<$<COMPILE_LANGUAGE:Fortran>:-Mreentrant>)

0 commit comments

Comments
 (0)