[Openmp-commits] [openmp] Fix: Add missing preprocessor guard for hwloc types on macOS (PR #156708)
Burhan Söğüt via Openmp-commits
openmp-commits at lists.llvm.org
Wed Sep 3 11:04:53 PDT 2025
https://github.com/bursow updated https://github.com/llvm/llvm-project/pull/156708
>From c9d9557d59cec1c053df5ee10190fe1436291dfe Mon Sep 17 00:00:00 2001
From: Burhan <segabur at hotmail.com>
Date: Wed, 3 Sep 2025 19:10:12 +0300
Subject: [PATCH] Fix: Add missing preprocessor guard for hwloc types on macOS
---
openmp/runtime/src/kmp_alloc.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/openmp/runtime/src/kmp_alloc.cpp b/openmp/runtime/src/kmp_alloc.cpp
index 051f88c5a0996..b608d1985878b 100644
--- a/openmp/runtime/src/kmp_alloc.cpp
+++ b/openmp/runtime/src/kmp_alloc.cpp
@@ -1545,7 +1545,7 @@ void __kmp_fini_memkind() {
#endif
}
-#if KMP_USE_HWLOC
+#if KMP_USE_HWLOC && KMP_AFFINITY_SUPPORTED
static bool __kmp_is_hwloc_membind_supported(hwloc_membind_policy_t policy) {
#if HWLOC_API_VERSION >= 0x00020300
const hwloc_topology_support *support;
@@ -1563,6 +1563,7 @@ static bool __kmp_is_hwloc_membind_supported(hwloc_membind_policy_t policy) {
return false;
#endif
}
+#endif
void *__kmp_hwloc_alloc_membind(hwloc_memattr_id_e attr, size_t size,
hwloc_membind_policy_t policy) {
More information about the Openmp-commits
mailing list