diff options
author | Khyber Sen <khyber@google.com> | 2024-01-31 08:59:15 +0000 |
---|---|---|
committer | Khyber Sen <khyber@google.com> | 2024-02-03 09:41:41 +0000 |
commit | 264f63aa347a5dbb72366d1412b7b62404ce2eb0 (patch) | |
tree | c0dfbc19051f7acfc935d78d49693f0042dd0b3d | |
parent | b7f57cbc5a22d1f4bbad662a9190392ce14b485c (diff) | |
download | byteorder-264f63aa347a5dbb72366d1412b7b62404ce2eb0.tar.gz |
Disable std in trusty kernel buildsemu-34-3-release
Rust in the trusty kernel is `#[no_std]`,
so we need to disable all features that depend on std.
Change-Id: I65dd566cf83e5765fd3c00c12349e3704a3773e8
-rw-r--r-- | cargo2rulesmk.json | 3 | ||||
-rw-r--r-- | patches/rules.mk.diff | 17 | ||||
-rw-r--r-- | rules.mk | 8 |
3 files changed, 27 insertions, 1 deletions
diff --git a/cargo2rulesmk.json b/cargo2rulesmk.json new file mode 100644 index 0000000..3f48c7d --- /dev/null +++ b/cargo2rulesmk.json @@ -0,0 +1,3 @@ +{ + "patch": "patches/rules.mk.diff" +}
\ No newline at end of file diff --git a/patches/rules.mk.diff b/patches/rules.mk.diff new file mode 100644 index 0000000..307b117 --- /dev/null +++ b/patches/rules.mk.diff @@ -0,0 +1,17 @@ +diff --git a/rules.mk b/rules.mk +index 28e6a41..893dbc6 100644 +--- a/rules.mk ++++ b/rules.mk +@@ -10,6 +10,12 @@ MODULE_SRCS := \ + MODULE_RUST_EDITION := 2018 + MODULE_RUSTFLAGS += \ + --cfg 'feature="default"' \ ++ ++ifeq ($(call TOBOOL,$(TRUSTY_USERSPACE)),true) ++ ++MODULE_RUSTFLAGS += \ + --cfg 'feature="std"' \ + ++endif ++ + include make/library.mk @@ -1,4 +1,4 @@ -# This file is generated by cargo2rulesmk.py --run. +# This file is generated by cargo2rulesmk.py --run --config cargo2rulesmk.json. # Do not modify this file as changes will be overridden on upgrade. LOCAL_DIR := $(GET_LOCAL_DIR) @@ -10,6 +10,12 @@ MODULE_SRCS := \ MODULE_RUST_EDITION := 2018 MODULE_RUSTFLAGS += \ --cfg 'feature="default"' \ + +ifeq ($(call TOBOOL,$(TRUSTY_USERSPACE)),true) + +MODULE_RUSTFLAGS += \ --cfg 'feature="std"' \ +endif + include make/library.mk |