From b742dcade2e1db1ab8898307eda0044de027c3cc Mon Sep 17 00:00:00 2001 From: Sean Cross Date: Fri, 12 Mar 2021 09:18:30 +0800 Subject: [PATCH] xous: make macros optional These are not used when building libstd. Signed-off-by: Sean Cross --- xous-rs/Cargo.toml | 4 ++-- xous-rs/src/lib.rs | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/xous-rs/Cargo.toml b/xous-rs/Cargo.toml index 6aab704d7..c7c5c67bf 100644 --- a/xous-rs/Cargo.toml +++ b/xous-rs/Cargo.toml @@ -8,7 +8,7 @@ description = "System call interface for Xous" [dependencies] bitflags = {version = "1", optional = true } -xous-macros = { path = "../macros", version = "0.1.0" } +xous-macros = { path = "../macros", version = "0.1.0", optional = true } log = { version = "0.4", optional = true } rkyv = { version = "0.3.1", default_features = false, optional = true } core = { version = '1.0.0', optional = true, package = 'rustc-std-workspace-core' } @@ -33,7 +33,7 @@ logging = ["log"] # This is being built as part of libstd rustc-dep-of-std = ['core', 'compiler_builtins/rustc-dep-of-std'] -default = ["bit-flags", "archive"] +default = ["bit-flags", "archive", "xous-macros"] [target.'cfg(any(windows,unix))'.dependencies] lazy_static = "1.4" diff --git a/xous-rs/src/lib.rs b/xous-rs/src/lib.rs index 805591e22..c5dc3b55b 100644 --- a/xous-rs/src/lib.rs +++ b/xous-rs/src/lib.rs @@ -4,8 +4,9 @@ #[macro_use] extern crate bitflags; +#[cfg(not(feature = "rustc-dep-of-std"))] extern crate xous_macros as macros; - +#[cfg(not(feature = "rustc-dep-of-std"))] pub use macros::xous_main; pub mod arch;