[Openmp-commits] [PATCH] D76755: Fix build on macOS sdk 10.12 and newer
Andrey Churbanov via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Wed Mar 25 06:59:46 PDT 2020
AndreyChurbanov added inline comments.
================
Comment at: openmp/runtime/src/kmp_wrapper_getpid.h:26
+#include <Availability.h>
+#if __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_10_12
+#define __kmp_gettid() pthread_mach_thread_np(pthread_self())
----------------
I am not an expert on MacOS, but this #if looks wrong. Because on earlier systems macro __MAC_10_12 is not defined, thus making the comparison to always be TRUE, and the code on #else is then a dead code.
Probably the comparison with the value of the macro (like 101200) could work instead.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76755/new/
https://reviews.llvm.org/D76755
More information about the Openmp-commits
mailing list