Skip to content

Commit 50b299e

Browse files
authored
Merge pull request #4 from albertziegenhagel/windows
Windows linker issues
2 parents acc48f6 + 970f43b commit 50b299e

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

runtime/flang/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,9 @@ add_dependencies(flang_shared
579579
if (NOT MSVC)
580580
target_compile_options(flang_static PRIVATE -fPIC)
581581
target_compile_options(flang_shared PRIVATE -fPIC)
582+
else()
583+
set_target_properties(flang_static PROPERTIES LINKER_LANGUAGE CXX)
584+
set_target_properties(flang_shared PROPERTIES LINKER_LANGUAGE CXX)
582585
endif()
583586

584587
target_compile_options(flang_static PUBLIC $<$<COMPILE_LANGUAGE:Fortran>:-Mreentrant>)

runtime/flangrti/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,8 @@ set_target_properties(flangrti_shared flangrti_static
234234
if (NOT MSVC)
235235
target_compile_options(flangrti_static PRIVATE -fPIC)
236236
target_compile_options(flangrti_shared PRIVATE -fPIC)
237+
else()
238+
set_target_properties(flangrti_shared PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
237239
endif()
238240

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

0 commit comments

Comments
 (0)