diff options
author | Dennis Kempin <denniskempin@google.com> | 2023-01-17 12:24:29 -0800 |
---|---|---|
committer | crosvm LUCI <crosvm-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-01-19 21:21:59 +0000 |
commit | acc162000f32104957205e7d301d7194fe1fe543 (patch) | |
tree | afafc9ef9c921240da9d8621e109384e4fd97293 /usb_util | |
parent | 4c66bd3e7f73341cc9d8039870bebbc02a353746 (diff) | |
download | crosvm-acc162000f32104957205e7d301d7194fe1fe543.tar.gz |
Add conditional compilation for unix-only crates
Instead of configuring which crates to --exclude in
test_config.py, we can use conditional compilation to
exclude code that is not supported on windows.
This allows more fine-grained control and also allows
us to use plain cargo for building without complicated
configuration and exclusions.
BUG=b:265829867
TEST=cargo test --lib --bins --workspace
--target=x86_64-pc-windows-gnu
--features=all-mingw64
Change-Id: I8422c3f08053bc27d9896b220876a56bd25543d6
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4165868
Reviewed-by: Vikram Auradkar <auradkar@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Diffstat (limited to 'usb_util')
-rw-r--r-- | usb_util/src/lib.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/usb_util/src/lib.rs b/usb_util/src/lib.rs index 1333bde6d..d69fe85f2 100644 --- a/usb_util/src/lib.rs +++ b/usb_util/src/lib.rs @@ -5,6 +5,7 @@ //! USB device access and descriptor manipulation. mod descriptor; +#[cfg(unix)] mod device; mod error; mod types; @@ -13,8 +14,11 @@ pub use self::descriptor::parse_usbfs_descriptors; pub use self::descriptor::ConfigDescriptorTree; pub use self::descriptor::DeviceDescriptorTree; pub use self::descriptor::InterfaceDescriptorTree; +#[cfg(unix)] pub use self::device::Device; +#[cfg(unix)] pub use self::device::Transfer; +#[cfg(unix)] pub use self::device::TransferStatus; pub use self::error::Error; pub use self::error::Result; |