ladybird/Meta/Utils/find_compiler.sh
Timothy Flynn ce7b69ff31 Meta: Move utility scripts to a subfolder
The idea is that scripts directly under Meta are meant to be run by
people. Scripts that are only imported or run by other scripts are
moved to a subdirectory.
2026-04-23 12:36:08 -04:00

22 lines
438 B
Bash

# shellcheck shell=bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
pick_host_compiler() {
local output
local status
output=$("${DIR}/find_compiler.py" "$@")
status=$?
if [[ ${status} -ne 0 ]] ; then
exit ${status}
fi
if [[ "${output}" != *"CC="* || "${output}" != *"CXX="* ]] ; then
echo "Unexpected output from find_compiler.py"
exit 1
fi
eval "${output}"
}