Skip to content

Commit 6309a08

Browse files
Pre-generate files in build-only components
This is needed for cross-compilation because some scripts to generate generated files compile and execute a C program, and our scripts aren't set up to use a different compiler than the one we cross-compile with. Do this for all build components. It's not ideal but not harmful, and it's easier than figuring out exactly which build components are problematic. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
1 parent ff82db6 commit 6309a08

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

scripts/all-core.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -944,16 +944,21 @@ run_component () {
944944
fi
945945
946946
case ${current_component#component_} in
947+
# - Many check_xxx components expect generated files to be present,
948+
# and may silently check less if they aren't.
949+
# - Build components that cross-compile would fail when trying to
950+
# generate files during the build if they can't an executable
951+
# produced by ${CC}. To keep things simple, pre-generate the files
952+
# for all build-only components, even the ones that don't require it.
953+
build_*|tf_psa_crypto_build*|\
947954
check_*|tf_psa_crypto_check*)
948-
# Many check_xxx components expect generated files to be present,
949-
# and may silently check less if they aren't.
950955
if in_mbedtls_repo; then
951956
make generated_files
952957
else
953958
$FRAMEWORK/scripts/make_generated_files.py
954959
fi;;
955960
*)
956-
# Build (and build-and-test) components are supposed to work
961+
# Other build or build-and-test components are supposed to work
957962
# whether generated files are already present or not.
958963
# Test with the generated files absent, since if this works,
959964
# it's likely to work with generated files present as well.

0 commit comments

Comments
 (0)