xous: make macros optional

These are not used when building libstd.

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2021-03-12 09:18:30 +08:00
parent beb3e0fec6
commit b742dcade2
2 changed files with 4 additions and 3 deletions

View file

@ -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"

View file

@ -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;