[Openmp-commits] [openmp] [OpenMP] Move KMP_CANCEL_THREADS control from preprocessor to CMake (PR #193681)
Mark Zhuang via Openmp-commits
openmp-commits at lists.llvm.org
Tue Jun 16 20:13:55 PDT 2026
zqb-all wrote:
Thanks, and good question.
To be honest, I'm not very familiar with the current state of Android and WASM here either, which is why I kept the original special-casing for both rather than changing that behavior.
Digging into it a bit more:
For Android specifically, pthread_cancel isn't declared in Bionic's <pthread.h> at all, and per Bionic's own status doc (https://github.com/aosp-mirror/platform_bionic/blob/731631f300090436d7f5df80d50b6275c8c60a93/docs/status.md?plain=1#L49-L51) it's unsupported and "unlikely to ever be implemented". So the new check_symbol_exists should already return false on a real Android sysroot, which makes the explicit ANDROID branch redundant.
WASM is less clear: the CMake comment
https://github.com/llvm/llvm-project/blob/68ea91dd8b506764c0a89e9220cfcefcf3790973/openmp/runtime/cmake/config-ix.cmake#L153-L156
notes that CMake "does not yet know how to detect" the WebAssembly threading setup, so I'm less confident the symbol check behaves reliably there.
That said, I'd prefer not to fold the Android removal into this patch. This PR is meant to be a mechanical move of the existing logic from the preprocessor to CMake, preserving current behavior. Dropping the Android handling is a behavioral change, so I'd rather do it as a separate change and let a reviewer who actually knows the Android build confirm it. Happy to follow up with that if it sounds reasonable.
https://github.com/llvm/llvm-project/pull/193681
More information about the Openmp-commits
mailing list