Skip to content

Commit

Permalink
boards: Support optimise for size
Browse files Browse the repository at this point in the history
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
  • Loading branch information
alistair23 committed May 23, 2024
1 parent 3738d2a commit cfefb8b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion boards/Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -247,11 +247,15 @@ RUSTDOC_FLAGS_TOCK ?= -D warnings
# sizes, and makes debugging easier since debug information for the core
# library is included in the resulting .elf file. See
# https://github.com/tock/tock/pull/2847 for more details.
# - `optimize_for_size`: Sets a feature flag in the core library that aims to
# produce smaller implementations for certain algorithms. See
# https://github.com/rust-lang/rust/pull/125011 for more details.
# - `--document-hidden-items`: Document internal interfaces when building
# rustdoc API documentation.
ifneq ($(USE_STABLE_RUST),1)
CARGO_FLAGS_TOCK += \
-Z build-std=core,compiler_builtins
-Z build-std=core,compiler_builtins \
--features="optimize_for_size"
RUSTDOC_FLAGS_TOCK += -Z unstable-options --document-hidden-items
endif

Expand Down

0 comments on commit cfefb8b

Please sign in to comment.