mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-23 00:35:50 +01:00
Test GCC and Clang with common build options
Goals: * Build with common compilers with common options, so that we don't miss a (potentially useful) warning only triggered with certain build options. * A previous commit removed -O0 test jobs, leaving only the one with -m32. We have inline assembly that is disabled with -O0, falling back to generic C code. This commit restores a test that runs the generic C code on a 64-bit platform.
This commit is contained in:
parent
99d70d8cb1
commit
0fe92c2f4f
@ -1091,6 +1091,30 @@ component_test_cmake_shared () {
|
|||||||
make test
|
make test
|
||||||
}
|
}
|
||||||
|
|
||||||
|
test_build_opt () {
|
||||||
|
info=$1 cc=$2; shift 2
|
||||||
|
for opt in "$@"; do
|
||||||
|
msg "build/test: $cc $opt, $info" # ~ 30s
|
||||||
|
make CC="$cc" CFLAGS="$opt -Wall -Wextra -Werror"
|
||||||
|
# We're confident enough in compilers to not run _all_ the tests,
|
||||||
|
# but at least run the unit tests. In particular, runs with
|
||||||
|
# optimizations use inline assembly whereas runs with -O0
|
||||||
|
# skip inline assembly.
|
||||||
|
make test # ~30s
|
||||||
|
make clean
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
component_test_clang_opt () {
|
||||||
|
scripts/config.pl full
|
||||||
|
test_build_opt 'full config' clang -O0 -Os -O2
|
||||||
|
}
|
||||||
|
|
||||||
|
component_test_gcc_opt () {
|
||||||
|
scripts/config.pl full
|
||||||
|
test_build_opt 'full config' gcc -O0 -Os -O2
|
||||||
|
}
|
||||||
|
|
||||||
component_build_mbedtls_config_file () {
|
component_build_mbedtls_config_file () {
|
||||||
msg "build: make with MBEDTLS_CONFIG_FILE" # ~40s
|
msg "build: make with MBEDTLS_CONFIG_FILE" # ~40s
|
||||||
# Use the full config so as to catch a maximum of places where
|
# Use the full config so as to catch a maximum of places where
|
||||||
|
Loading…
Reference in New Issue
Block a user