diff --git a/runtime/flang/CMakeLists.txt b/runtime/flang/CMakeLists.txt index 345cc88c2ad..a6a4403fa66 100644 --- a/runtime/flang/CMakeLists.txt +++ b/runtime/flang/CMakeLists.txt @@ -579,6 +579,9 @@ add_dependencies(flang_shared if (NOT MSVC) target_compile_options(flang_static PRIVATE -fPIC) target_compile_options(flang_shared PRIVATE -fPIC) +else() + set_target_properties(flang_static PROPERTIES LINKER_LANGUAGE CXX) + set_target_properties(flang_shared PROPERTIES LINKER_LANGUAGE CXX) endif() target_compile_options(flang_static PUBLIC $<$:-Mreentrant>) diff --git a/runtime/flangrti/CMakeLists.txt b/runtime/flangrti/CMakeLists.txt index 82cbe1bfb6b..2dc0cda32f1 100644 --- a/runtime/flangrti/CMakeLists.txt +++ b/runtime/flangrti/CMakeLists.txt @@ -234,6 +234,8 @@ set_target_properties(flangrti_shared flangrti_static if (NOT MSVC) target_compile_options(flangrti_static PRIVATE -fPIC) target_compile_options(flangrti_shared PRIVATE -fPIC) +else() + set_target_properties(flangrti_shared PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE) endif() target_compile_options(flangrti_static PUBLIC $<$:-Mreentrant>)