blob: 437099485a624a0a1316cbee7d8ed63dd631cd05 [file] [log] [blame]
diff --git a/rules.mk b/rules.desired.mk
index 4ca7b4d..e2f63f2 100644
--- a/rules.mk
+++ b/rules.desired.mk
@@ -10,8 +10,36 @@ MODULE_RUST_CRATE_TYPES := rlib
MODULE_SRCS := $(LOCAL_DIR)/src/lib.rs
MODULE_ADD_IMPLICIT_DEPS := false
MODULE_RUST_EDITION := 2015
+MODULE_RUSTFLAGS += \
+ --cfg 'freebsd11' \
+ --cfg 'libc_align' \
+ --cfg 'libc_cfg_target_vendor' \
+ --cfg 'libc_const_extern_fn' \
+ --cfg 'libc_const_size_of' \
+ --cfg 'libc_core_cvoid' \
+ --cfg 'libc_int128' \
+ --cfg 'libc_long_array' \
+ --cfg 'libc_non_exhaustive' \
+ --cfg 'libc_packedN' \
+ --cfg 'libc_priv_mod_use' \
+ --cfg 'libc_ptr_addr_of' \
+ --cfg 'libc_underscore_const_names' \
+ --cfg 'libc_union' \
+ -A unknown-lints \
+
MODULE_LIBRARY_DEPS := \
trusty/user/base/lib/libcompiler_builtins-rust \
trusty/user/base/lib/libcore-rust
+ifeq ($(call TOBOOL,$(TRUSTY_USERSPACE)),true)
+
+MODULE_RUSTFLAGS += \
+ --cfg 'feature="trusty_sys"' \
+
+MODULE_LIBRARY_DEPS += \
+ trusty/user/base/lib/libc-trusty \
+ trusty/user/base/lib/trusty-sys \
+
+endif
+
include make/library.mk