Skip to content

Commit f79d5bc

Browse files
authored
Merge pull request #128 from kornelski/targetfix
Fix semver break of target_supported
2 parents 81d3854 + f2bc50e commit f79d5bc

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/lib.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,12 @@ pub fn probe_library(name: &str) -> Result<Library, Error> {
246246
Config::new().probe(name)
247247
}
248248

249+
#[doc(hidden)]
250+
#[deprecated(note = "use config.target_supported() instance method instead")]
251+
pub fn target_supported() -> bool {
252+
Config::new().target_supported()
253+
}
254+
249255
/// Run `pkg-config` to get the value of a variable from a package using
250256
/// `--variable`.
251257
///
@@ -394,6 +400,7 @@ impl Config {
394400
Ok(library)
395401
}
396402

403+
/// True if pkg-config is used for the host system, or configured for cross-compilation
397404
pub fn target_supported(&self) -> bool {
398405
let target = env::var_os("TARGET").unwrap_or_default();
399406
let host = env::var_os("HOST").unwrap_or_default();

0 commit comments

Comments
 (0)