build.rs: More consistently use named constants for OS names.
This commit is contained in:
parent
4e37622614
commit
e8a5d1138c
5
build.rs
5
build.rs
@ -264,8 +264,9 @@ const LINUX_ABI: &[&str] = &[
|
||||
|
||||
/// Operating systems that have the same ABI as macOS on every architecture
|
||||
/// mentioned in `ASM_TARGETS`.
|
||||
const MACOS_ABI: &[&str] = &["ios", "macos", "tvos"];
|
||||
const MACOS_ABI: &[&str] = &["ios", MACOS, "tvos"];
|
||||
|
||||
const MACOS: &str = "macos";
|
||||
const WINDOWS: &str = "windows";
|
||||
|
||||
/// Read an environment variable and tell Cargo that we depend on it.
|
||||
@ -588,7 +589,7 @@ fn configure_cc(c: &mut cc::Build, target: &Target, include_dir: &Path) {
|
||||
let _ = c.flag(f);
|
||||
}
|
||||
|
||||
if target.os.as_str() == "macos" {
|
||||
if target.os.as_str() == MACOS {
|
||||
// ``-gfull`` is required for Darwin's |-dead_strip|.
|
||||
let _ = c.flag("-gfull");
|
||||
} else if !compiler.is_like_msvc() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user