From 7b519df9c8301c2483384f21f5902f7774bbb9c5 Mon Sep 17 00:00:00 2001 From: Jonathan Schwender Date: Wed, 2 Oct 2024 20:14:15 +0200 Subject: [PATCH] ohos: Linked shared lib on OpenHarmony The OpenHarmony SDK / sysroot contains libz.so and similar to android we can assume that libz will always be available. --- build.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.rs b/build.rs index 4e731f3e..6e17cc88 100644 --- a/build.rs +++ b/build.rs @@ -23,9 +23,9 @@ fn main() { } // All android compilers should come with libz by default, so let's just use - // the one already there. Likewise, Haiku always ships with libz, so we can - // link to it even when cross-compiling. - if target.contains("android") || target.contains("haiku") { + // the one already there. Likewise, Haiku and OpenHarmony always ship with libz, + // so we can link to it even when cross-compiling. + if target.contains("android") || target.contains("haiku") || target.ends_with("-ohos") { println!("cargo:rustc-link-lib=z"); return; }