Skip to content

Commit

Permalink
Add build tests for Thumb and Thumb2 with clang
Browse files Browse the repository at this point in the history
Signed-off-by: Dave Rodgman <[email protected]>
  • Loading branch information
dave-rodgman committed Jun 6, 2023
1 parent 763c8b9 commit 43ea9ab
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/scripts/all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3156,6 +3156,25 @@ component_build_arm_none_eabi_gcc_no_64bit_multiplication () {
not grep __aeabi_lmul library/*.o
}

component_build_arm_clang_thumb () {
# ~ 30s

scripts/config.py baremetal

msg "build: clang thumb 2, make"
make clean
make CC="clang" CFLAGS='-std=c99 -Werror -Os --target=arm-linux-gnueabihf -march=armv7-m -mthumb' lib

# Some Thumb 1 asm is sensitive to optimisation level, so test both -O0 and -Os
msg "build: clang thumb 1 -O0, make"
make clean
make CC="clang" CFLAGS='-std=c99 -Werror -O0 --target=arm-linux-gnueabihf -mcpu=arm1136j-s -mthumb' lib

msg "build: clang thumb 1 -Os, make"
make clean
make CC="clang" CFLAGS='-std=c99 -Werror -Os --target=arm-linux-gnueabihf -mcpu=arm1136j-s -mthumb' lib
}

component_build_armcc () {
msg "build: ARM Compiler 5"
scripts/config.py baremetal
Expand Down

0 comments on commit 43ea9ab

Please sign in to comment.