From f2bc50e7adb82a9a82d619686c9b2f24aee5a091 Mon Sep 17 00:00:00 2001 From: Kornel Date: Sat, 11 Dec 2021 00:17:00 +0000 Subject: [PATCH] Fix semver break of target_supported --- src/lib.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 0eae62b..daf5d0c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -246,6 +246,12 @@ pub fn probe_library(name: &str) -> Result { Config::new().probe(name) } +#[doc(hidden)] +#[deprecated(note = "use config.target_supported() instance method instead")] +pub fn target_supported() -> bool { + Config::new().target_supported() +} + /// Run `pkg-config` to get the value of a variable from a package using /// `--variable`. /// @@ -394,6 +400,7 @@ impl Config { Ok(library) } + /// True if pkg-config is used for the host system, or configured for cross-compilation pub fn target_supported(&self) -> bool { let target = env::var_os("TARGET").unwrap_or_default(); let host = env::var_os("HOST").unwrap_or_default();