mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-26 09:15:43 +01:00
all.sh: only check tools that are going to be used
Don't require openssl, mingw, etc. if we aren't going to run a component that uses them.
This commit is contained in:
parent
5331c6e0b1
commit
879642663a
@ -461,30 +461,50 @@ pre_print_configuration () {
|
|||||||
echo "ARMC6_BIN_DIR: $ARMC6_BIN_DIR"
|
echo "ARMC6_BIN_DIR: $ARMC6_BIN_DIR"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Make sure the tools we need are available.
|
||||||
pre_check_tools () {
|
pre_check_tools () {
|
||||||
ARMC5_CC="$ARMC5_BIN_DIR/armcc"
|
case " $RUN_COMPONENTS " in
|
||||||
ARMC5_AR="$ARMC5_BIN_DIR/armar"
|
# Require OpenSSL and GnuTLS if running any tests (as opposed to
|
||||||
ARMC6_CC="$ARMC6_BIN_DIR/armclang"
|
# only doing builds). Not all tests run OpenSSL and GnuTLS, but this
|
||||||
ARMC6_AR="$ARMC6_BIN_DIR/armar"
|
# is a good enough approximation in practice.
|
||||||
|
*" test_"*)
|
||||||
|
# To avoid setting OpenSSL and GnuTLS for each call to compat.sh
|
||||||
|
# and ssl-opt.sh, we just export the variables they require.
|
||||||
|
export OPENSSL_CMD="$OPENSSL"
|
||||||
|
export GNUTLS_CLI="$GNUTLS_CLI"
|
||||||
|
export GNUTLS_SERV="$GNUTLS_SERV"
|
||||||
|
# Avoid passing --seed flag in every call to ssl-opt.sh
|
||||||
|
if [ -n "${SEED-}" ]; then
|
||||||
|
export SEED
|
||||||
|
fi
|
||||||
|
check_tools "$OPENSSL" "$OPENSSL_LEGACY" "$OPENSSL_NEXT" \
|
||||||
|
"$GNUTLS_CLI" "$GNUTLS_SERV" \
|
||||||
|
"$GNUTLS_LEGACY_CLI" "$GNUTLS_LEGACY_SERV"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
# To avoid setting OpenSSL and GnuTLS for each call to compat.sh and ssl-opt.sh
|
case " $RUN_COMPONENTS " in
|
||||||
# we just export the variables they require
|
*_doxygen[_\ ]*) check_tools "doxygen" "dot";;
|
||||||
export OPENSSL_CMD="$OPENSSL"
|
esac
|
||||||
export GNUTLS_CLI="$GNUTLS_CLI"
|
|
||||||
export GNUTLS_SERV="$GNUTLS_SERV"
|
|
||||||
|
|
||||||
# Avoid passing --seed flag in every call to ssl-opt.sh
|
case " $RUN_COMPONENTS " in
|
||||||
if [ -n "${SEED-}" ]; then
|
*_arm_none_eabi_gcc[_\ ]*) check_tools "arm-none-eabi-gcc";;
|
||||||
export SEED
|
esac
|
||||||
fi
|
|
||||||
|
|
||||||
# Make sure the tools we need are available.
|
case " $RUN_COMPONENTS " in
|
||||||
check_tools "$OPENSSL" "$OPENSSL_LEGACY" "$OPENSSL_NEXT" \
|
*_mingw[_\ ]*) check_tools "i686-w64-mingw32-gcc";;
|
||||||
"$GNUTLS_CLI" "$GNUTLS_SERV" \
|
esac
|
||||||
"$GNUTLS_LEGACY_CLI" "$GNUTLS_LEGACY_SERV" "doxygen" "dot" \
|
|
||||||
"arm-none-eabi-gcc" "i686-w64-mingw32-gcc" "gdb"
|
case " $RUN_COMPONENTS " in
|
||||||
case $RUN_COMPONENTS in
|
*" test_zeroize "*) check_tools "gdb";;
|
||||||
|
esac
|
||||||
|
|
||||||
|
case " $RUN_COMPONENTS " in
|
||||||
*_armcc*)
|
*_armcc*)
|
||||||
|
ARMC5_CC="$ARMC5_BIN_DIR/armcc"
|
||||||
|
ARMC5_AR="$ARMC5_BIN_DIR/armar"
|
||||||
|
ARMC6_CC="$ARMC6_BIN_DIR/armclang"
|
||||||
|
ARMC6_AR="$ARMC6_BIN_DIR/armar"
|
||||||
check_tools "$ARMC5_CC" "$ARMC5_AR" "$ARMC6_CC" "$ARMC6_AR";;
|
check_tools "$ARMC5_CC" "$ARMC5_AR" "$ARMC6_CC" "$ARMC6_AR";;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user