[Openmp-commits] [PATCH] D86552: [OpenMP] Fix import library installation with MinGW

Mateusz MikuĊ‚a via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Aug 25 10:24:04 PDT 2020


mati865 created this revision.
mati865 added a reviewer: OpenMP.
mati865 added a project: OpenMP.
Herald added subscribers: openmp-commits, mstorsjo, guansong, yaxunl, mgorny.
mati865 requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added a subscriber: sstefan1.

Somehow I missed when submitting https://reviews.llvm.org/D85210 to review even though it was present in original patch for MSYS2 package. 
Without this change CMake tries to install `libomp.a` (which doesn't exist for shared build) instead of `libomp.dll.a`.

Should not affect MSVC at all: https://gitlab.kitware.com/cmake/cmake/-/blob/5e212cafba0f2266510841eea3f5c7b79fde9449/Modules/Platform/Windows.cmake#L16 but makes big difference


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D86552

Files:
  openmp/runtime/src/CMakeLists.txt


Index: openmp/runtime/src/CMakeLists.txt
===================================================================
--- openmp/runtime/src/CMakeLists.txt
+++ openmp/runtime/src/CMakeLists.txt
@@ -195,7 +195,7 @@
   # the import library is "re-linked" to include kmp_import.cpp which prevents
   # linking of both Visual Studio OpenMP and newly built OpenMP
   set_source_files_properties(kmp_import.cpp PROPERTIES COMPILE_FLAGS "${LIBOMP_CONFIGURED_CXXFLAGS}")
-  set(LIBOMP_IMP_LIB_FILE ${LIBOMP_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX})
+  set(LIBOMP_IMP_LIB_FILE ${LIBOMP_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX})
   set(LIBOMP_GENERATED_IMP_LIB_FILENAME ${LIBOMP_LIB_FILE}${CMAKE_STATIC_LIBRARY_SUFFIX})
   set_target_properties(omp PROPERTIES
     VERSION ${LIBOMP_VERSION_MAJOR}.${LIBOMP_VERSION_MINOR} # uses /version flag


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86552.287699.patch
Type: text/x-patch
Size: 821 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20200825/0b3aadae/attachment.bin>


More information about the Openmp-commits mailing list