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

@ -25,6 +25,6 @@ serde_json = { workspace = true }
[target.'cfg(target_os = "macos")'.dependencies]
mach2 = "0.4"
[target.'cfg(all(target_os = "linux", not(any(target_arch = "arm", target_arch = "aarch64", target_env = "ohos"))))'.dependencies]
[target.'cfg(all(target_os = "linux", not(any(target_arch = "arm", target_arch = "aarch64", target_env = "ohos", target_env = "musl"))))'.dependencies]
nix = { workspace = true, features = ["signal"] }
unwind-sys = "0.1.4"