wafHook: make crossFlags optional

The convention of `--cross-compile` and `--cross-execute` is common
enough that it seems like a reasonable default. However there are
projects like mpv which do not use these flags, and rightfully fails
to configure when passed unexpected flags.
This commit is contained in:
Andrew Childs 2020-02-09 15:53:46 +09:00
parent c6791b2117
commit 032d5e7e83

View file

@ -11,11 +11,13 @@ wafConfigurePhase() {
fi
local flagsArray=(
@crossFlags@
"${flagsArray[@]}"
$wafConfigureFlags "${wafConfigureFlagsArray[@]}"
${configureTargets:-configure}
)
if [ -z "${dontAddWafCrossFlags:-}" ]; then
flagsArray+=(@crossFlags@)
fi
echoCmd 'configure flags' "${flagsArray[@]}"
python "$wafPath" "${flagsArray[@]}"