background_hang_monitor: Add musl compatibility (#33153)

musl does not have libunwind readily available; even if it did, it has
no concept of ucontext (needing an external lib).  Similar to ohos,
disable the background hang monitor and use the DummySampler.

Signed-off-by: A. Wilcox <AWilcox@Wilcox-Tech.com>
This commit is contained in:
A. Wilcox 2024-08-21 16:38:28 -05:00 committed by GitHub
parent 7501e3e12f
commit 0e56241c1b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 19 additions and 4 deletions

View file

@ -8,7 +8,12 @@ pub mod background_hang_monitor;
mod sampler;
#[cfg(all(
target_os = "linux",
not(any(target_arch = "arm", target_arch = "aarch64", target_env = "ohos"))
not(any(
target_arch = "arm",
target_arch = "aarch64",
target_env = "ohos",
target_env = "musl"
))
))]
mod sampler_linux;
#[cfg(target_os = "macos")]