blob: e6bb09797afffb00539bd5418f59f23f78692568 [file] [edit]
#!/usr/bin/env bash
# used only for building Lean itself
root=$(dirname $0)
ldflags=("-L$root/lib/lean" "${LEANC_GMP:--lgmp}" @LEAN_EXTRA_LINKER_FLAGS@)
for arg in "$@"; do
# ccache doesn't like linker flags being passed here
[[ "$arg" = "-c" ]] && ldflags=()
[[ "$arg" = "-v" ]] && set -x
done
exec ${LEAN_CC:-@CMAKE_C_COMPILER@} "-I$root/include" @LEANC_EXTRA_FLAGS@ "$@" "${ldflags[@]}" -Wno-unused-command-line-argument