xref: /aosp_15_r20/external/crosvm/rutabaga_gfx/src/rutabaga_os/sys/mod.rs (revision bb4ee6a4ae7042d18b07a98463b9c8b875e44b39)
1 // Copyright 2023 The ChromiumOS Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #[cfg(any(target_os = "android", target_os = "linux"))]
6 pub mod linux;
7 
8 #[cfg(any(target_os = "fuchsia", target_os = "macos", target_os = "nto"))]
9 pub mod stub;
10 
11 #[cfg(windows)]
12 pub mod windows;
13 
14 cfg_if::cfg_if! {
15     if #[cfg(any(target_os = "android", target_os = "linux"))] {
16         pub use linux as platform;
17     } else if #[cfg(windows)] {
18         pub use windows as platform;
19     } else if #[cfg(any(target_os = "fuchsia", target_os = "macos", target_os = "nto"))] {
20         pub use stub as platform;
21     } else {
22         compile_error!("Unsupported platform");
23     }
24 }
25