tag | a5994100f5715d6b0cc6f88f974fd5c3c9d15b90 | |
---|---|---|
tagger | Xin Li <delphij@google.com> | Wed Apr 24 20:16:28 2024 -0700 |
object | f1be4351e076914fa19a5e4ca3fc7206ebd1558f |
aml_odp_341610000 (11382236,com.google.android.go.ondevicepersonalization,com.google.android.ondevicepersonalization)
commit | f1be4351e076914fa19a5e4ca3fc7206ebd1558f | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Fri Jul 07 07:12:22 2023 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Fri Jul 07 07:12:22 2023 +0000 |
tree | 9057ef9f4fc908466cb4b084ec40777c9fd31fe8 | |
parent | 55efd1686c51ad56ff2e615ea981327c6e068b96 [diff] | |
parent | a45850c1c21ff9a6cf83e3a1fbc887d5cbf1b026 [diff] |
Snap for 10453938 from a45850c1c21ff9a6cf83e3a1fbc887d5cbf1b026 to mainline-odp-release Change-Id: Ibbcbd5496022173272a90d9867f0bb8e664305d9
A macro to ergonomically define an item depending on a large number of #[cfg] parameters. Structured like an if-else chain, the first matching branch is the item that gets emitted.
[dependencies] cfg-if = "0.1"
cfg_if::cfg_if! { if #[cfg(unix)] { fn foo() { /* unix specific functionality */ } } else if #[cfg(target_pointer_width = "32")] { fn foo() { /* non-unix, 32-bit functionality */ } } else { fn foo() { /* fallback implementation */ } } } fn main() { foo(); }
This project is licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in cfg-if
by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.