[Openmp-commits] [PATCH] D62841: [openmp] Use libffi only when LLVM_ENABLE_FFI is on
Taewook Oh via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Mon Jun 3 23:47:10 PDT 2019
twoh updated this revision to Diff 202864.
twoh added a comment.
Addressed comments from @hahnfeld. Thanks!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62841/new/
https://reviews.llvm.org/D62841
Files:
openmp/libomptarget/cmake/Modules/LibomptargetGetDependencies.cmake
Index: openmp/libomptarget/cmake/Modules/LibomptargetGetDependencies.cmake
===================================================================
--- openmp/libomptarget/cmake/Modules/LibomptargetGetDependencies.cmake
+++ openmp/libomptarget/cmake/Modules/LibomptargetGetDependencies.cmake
@@ -65,36 +65,38 @@
pkg_check_modules(LIBOMPTARGET_SEARCH_LIBFFI QUIET libffi)
-find_path (
- LIBOMPTARGET_DEP_LIBFFI_INCLUDE_DIR
- NAMES
- ffi.h
- HINTS
- ${LIBOMPTARGET_SEARCH_LIBFFI_INCLUDEDIR}
- ${LIBOMPTARGET_SEARCH_LIBFFI_INCLUDE_DIRS}
- PATHS
- /usr/include
- /usr/local/include
- /opt/local/include
- /sw/include
- ENV CPATH)
-
-# Don't bother look for the library if the header files were not found.
-if (LIBOMPTARGET_DEP_LIBFFI_INCLUDE_DIR)
- find_library (
- LIBOMPTARGET_DEP_LIBFFI_LIBRARIES
+if (OPENMP_STANDALONE_BUILD OR LLVM_ENABLE_FFI)
+ find_path (
+ LIBOMPTARGET_DEP_LIBFFI_INCLUDE_DIR
NAMES
- ffi
+ ffi.h
HINTS
- ${LIBOMPTARGET_SEARCH_LIBFFI_LIBDIR}
- ${LIBOMPTARGET_SEARCH_LIBFFI_LIBRARY_DIRS}
+ ${LIBOMPTARGET_SEARCH_LIBFFI_INCLUDEDIR}
+ ${LIBOMPTARGET_SEARCH_LIBFFI_INCLUDE_DIRS}
PATHS
- /usr/lib
- /usr/local/lib
- /opt/local/lib
- /sw/lib
- ENV LIBRARY_PATH
- ENV LD_LIBRARY_PATH)
+ /usr/include
+ /usr/local/include
+ /opt/local/include
+ /sw/include
+ ENV CPATH)
+
+ # Don't bother look for the library if the header files were not found.
+ if (LIBOMPTARGET_DEP_LIBFFI_INCLUDE_DIR)
+ find_library (
+ LIBOMPTARGET_DEP_LIBFFI_LIBRARIES
+ NAMES
+ ffi
+ HINTS
+ ${LIBOMPTARGET_SEARCH_LIBFFI_LIBDIR}
+ ${LIBOMPTARGET_SEARCH_LIBFFI_LIBRARY_DIRS}
+ PATHS
+ /usr/lib
+ /usr/local/lib
+ /opt/local/lib
+ /sw/lib
+ ENV LIBRARY_PATH
+ ENV LD_LIBRARY_PATH)
+ endif()
endif()
set(LIBOMPTARGET_DEP_LIBFFI_INCLUDE_DIRS ${LIBOMPTARGET_DEP_LIBFFI_INCLUDE_DIR})
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62841.202864.patch
Type: text/x-patch
Size: 1999 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20190604/5cd8a0fe/attachment-0001.bin>
More information about the Openmp-commits
mailing list