Skip to content

Commit

Permalink
Use ompstub by default on Windows on ARM
Browse files Browse the repository at this point in the history
OpenMP is not supported on Windows on ARM yet.
Therefore this PR modified Cmakelist to use ompstub
on Windows on ARM for linking by default.
  • Loading branch information
kaadam committed Jun 22, 2021
1 parent f434474 commit 22244ae
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions runtime/flangrti/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,16 @@ endif()

# Import OpenMP
if (NOT DEFINED LIBOMP_EXPORT_DIR)
find_library(
FLANG_LIBOMP
libomp.so
HINTS ${CMAKE_BINARY_DIR}/lib)
target_link_libraries(flangrti_shared ${FLANG_LIBOMP})
# OpenMP is not supported on Windows on ARM yet, use ompstub for linking by default
if(NOT (MSVC AND ${TARGET_ARCHITECTURE} STREQUAL "aarch64"))
find_library(
FLANG_LIBOMP
NAMES omp libomp
HINTS ${CMAKE_BINARY_DIR}/lib)
target_link_libraries(flangrti_shared PRIVATE ${FLANG_LIBOMP})
else()
target_link_libraries(flangrti_shared PRIVATE ompstub_shared)
endif()
endif()

find_library(
Expand Down

0 comments on commit 22244ae

Please sign in to comment.