[Openmp-commits] [PATCH] D140419: [OpenMP] Disable libomptarget integration on unsupported platforms

Joseph Huber via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Dec 20 11:10:49 PST 2022


jhuber6 accepted this revision.
jhuber6 added inline comments.
This revision is now accepted and ready to land.


================
Comment at: openmp/runtime/src/kmp_config.h.cmake:97
 #define KMP_HAVE__ALIGNED_MALLOC LIBOMP_HAVE__ALIGNED_MALLOC
+#cmakedefine01 OPENMP_ENABLE_LIBOMPTARGET
+#define ENABLE_LIBOMPTARGET OPENMP_ENABLE_LIBOMPTARGET
----------------
gValarini wrote:
> jhuber6 wrote:
> > Is this enough? We need to check the target OS, because even if the user builds on MacOS with `libomptarget` it won't always be included like if the user just passed `-fopenmp`.
> If I am not mistaken, that is already checked on the OpenMP //CMakeLists.txt// file. `OPENMP_ENABLE_LIBOMPTARGET` can only be set to 1 if the target OS is not either macOS or Windows.
> 
> But do you think it would be better to tie that to something like `! (KMP_OS_WINDOWS || KMP_OS_DARWIN)`?
You're right, forgot we did that check. It'll work for now and I guess we can revisit it if we ever want to lift that restriction.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140419/new/

https://reviews.llvm.org/D140419



More information about the Openmp-commits mailing list