Sha256: 41eef7020d4c28ce70c71036009be4be5844572b26e32b840f671b924174475e

Contents?: true

Size: 1.4 KB

Versions: 8

Compression:

Stored size: 1.4 KB

Contents

// SPDX-License-Identifier: Apache-2.0

macro_rules! test {
    () => (cfg!(test) && ::std::env::var("_CLANG_SYS_TEST").is_ok());
}

macro_rules! target_os {
    ($os:expr) => {
        if cfg!(test) && ::std::env::var("_CLANG_SYS_TEST").is_ok() {
            let var = ::std::env::var("_CLANG_SYS_TEST_OS");
            var.map_or(false, |v| v == $os)
        } else {
            cfg!(target_os = $os)
        }
    };
}

macro_rules! target_arch {
    ($arch:expr) => {
        if cfg!(test) && ::std::env::var("_CLANG_SYS_TEST").is_ok() {
            let var = ::std::env::var("_CLANG_SYS_TEST_ARCH");
            var.map_or(false, |v| v == $arch)
        } else {
            cfg!(target_arch = $arch)
        }
    };
}

macro_rules! target_pointer_width {
    ($pointer_width:expr) => {
        if cfg!(test) && ::std::env::var("_CLANG_SYS_TEST").is_ok() {
            let var = ::std::env::var("_CLANG_SYS_TEST_POINTER_WIDTH");
            var.map_or(false, |v| v == $pointer_width)
        } else {
            cfg!(target_pointer_width = $pointer_width)
        }
    };
}

macro_rules! target_env {
    ($env:expr) => {
        if cfg!(test) && ::std::env::var("_CLANG_SYS_TEST").is_ok() {
            let var = ::std::env::var("_CLANG_SYS_TEST_ENV");
            var.map_or(false, |v| v == $env)
        } else {
            cfg!(target_env = $env)
        }
    };
}

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
wasmtime-29.0.0 ./ext/cargo-vendor/clang-sys-1.8.1/build/macros.rs
wasmtime-28.0.0 ./ext/cargo-vendor/clang-sys-1.8.1/build/macros.rs
wasmtime-27.0.0 ./ext/cargo-vendor/clang-sys-1.8.1/build/macros.rs
wasmtime-26.0.0 ./ext/cargo-vendor/clang-sys-1.8.1/build/macros.rs
wasmtime-25.0.2 ./ext/cargo-vendor/clang-sys-1.8.1/build/macros.rs
wasmtime-25.0.1 ./ext/cargo-vendor/clang-sys-1.8.1/build/macros.rs
wasmtime-25.0.0 ./ext/cargo-vendor/clang-sys-1.8.1/build/macros.rs
wasmtime-24.0.0 ./ext/cargo-vendor/clang-sys-1.8.1/build/macros.rs