Fix up vendor for... linux?
This commit is contained in:
parent
b799fedeec
commit
81de013103
114 changed files with 21002 additions and 21002 deletions
92
vendor/log/build.rs
vendored
92
vendor/log/build.rs
vendored
|
|
@ -1,46 +1,46 @@
|
|||
//! This build script detects target platforms that lack proper support for
|
||||
//! atomics and sets `cfg` flags accordingly.
|
||||
|
||||
use std::env;
|
||||
use std::str;
|
||||
|
||||
fn main() {
|
||||
let target = match rustc_target() {
|
||||
Some(target) => target,
|
||||
None => return,
|
||||
};
|
||||
|
||||
if target_has_atomic_cas(&target) {
|
||||
println!("cargo:rustc-cfg=atomic_cas");
|
||||
}
|
||||
|
||||
if target_has_atomics(&target) {
|
||||
println!("cargo:rustc-cfg=has_atomics");
|
||||
}
|
||||
|
||||
println!("cargo:rerun-if-changed=build.rs");
|
||||
}
|
||||
|
||||
fn target_has_atomic_cas(target: &str) -> bool {
|
||||
match &target[..] {
|
||||
"thumbv6m-none-eabi"
|
||||
| "msp430-none-elf"
|
||||
| "riscv32i-unknown-none-elf"
|
||||
| "riscv32imc-unknown-none-elf" => false,
|
||||
_ => true,
|
||||
}
|
||||
}
|
||||
|
||||
fn target_has_atomics(target: &str) -> bool {
|
||||
match &target[..] {
|
||||
"thumbv4t-none-eabi"
|
||||
| "msp430-none-elf"
|
||||
| "riscv32i-unknown-none-elf"
|
||||
| "riscv32imc-unknown-none-elf" => false,
|
||||
_ => true,
|
||||
}
|
||||
}
|
||||
|
||||
fn rustc_target() -> Option<String> {
|
||||
env::var("TARGET").ok()
|
||||
}
|
||||
//! This build script detects target platforms that lack proper support for
|
||||
//! atomics and sets `cfg` flags accordingly.
|
||||
|
||||
use std::env;
|
||||
use std::str;
|
||||
|
||||
fn main() {
|
||||
let target = match rustc_target() {
|
||||
Some(target) => target,
|
||||
None => return,
|
||||
};
|
||||
|
||||
if target_has_atomic_cas(&target) {
|
||||
println!("cargo:rustc-cfg=atomic_cas");
|
||||
}
|
||||
|
||||
if target_has_atomics(&target) {
|
||||
println!("cargo:rustc-cfg=has_atomics");
|
||||
}
|
||||
|
||||
println!("cargo:rerun-if-changed=build.rs");
|
||||
}
|
||||
|
||||
fn target_has_atomic_cas(target: &str) -> bool {
|
||||
match &target[..] {
|
||||
"thumbv6m-none-eabi"
|
||||
| "msp430-none-elf"
|
||||
| "riscv32i-unknown-none-elf"
|
||||
| "riscv32imc-unknown-none-elf" => false,
|
||||
_ => true,
|
||||
}
|
||||
}
|
||||
|
||||
fn target_has_atomics(target: &str) -> bool {
|
||||
match &target[..] {
|
||||
"thumbv4t-none-eabi"
|
||||
| "msp430-none-elf"
|
||||
| "riscv32i-unknown-none-elf"
|
||||
| "riscv32imc-unknown-none-elf" => false,
|
||||
_ => true,
|
||||
}
|
||||
}
|
||||
|
||||
fn rustc_target() -> Option<String> {
|
||||
env::var("TARGET").ok()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue