From 691aa961b16cc42d79e66147dabf48c65db17782 Mon Sep 17 00:00:00 2001 From: Jaeden Amero Date: Mon, 1 Jul 2019 11:21:36 +0100 Subject: [PATCH] baremetal: Use Oz when building with armclang Oz is allowed to make size optimizations that make the code slower, where Os isn't. Optimize with Oz, as we care more about having a small code footprint than having fast code. --- scripts/baremetal.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/baremetal.sh b/scripts/baremetal.sh index be5fd0488..0faa53218 100755 --- a/scripts/baremetal.sh +++ b/scripts/baremetal.sh @@ -155,7 +155,7 @@ baremetal_build_armc6() echo "Create 32-bit library-only baremetal build (ARMC6, Config: $BAREMETAL_CONFIG)" armc6_ver=$($ARMC6_CC --version | sed -n 's/.*ARM Compiler \([^ ]*\)$/\1/p') - CFLAGS_BAREMETAL="-Os --target=arm-arm-none-eabi -mthumb -mcpu=cortex-m0plus -xc --std=c99" + CFLAGS_BAREMETAL="-Oz --target=arm-arm-none-eabi -mthumb -mcpu=cortex-m0plus -xc --std=c99" if [ $check -ne 0 ]; then CFLAGS_BAREMETAL="$CFLAGS_BAREMETAL -Werror" fi