Skip to content
This repository was archived by the owner on Apr 13, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion driver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -eu
setup_variables() {
while [[ ${#} -ge 1 ]]; do
case ${1} in
"AR="*|"ARCH="*|"CC="*|"LD="*|"NM"=*|"OBJDUMP"=*|"REPO="*) export "${1?}" ;;
"AR="*|"ARCH="*|"CC="*|"LD="*|"NM"=*|"OBJDUMP"=*|"OBJSIZE"=*|"REPO="*) export "${1?}" ;;
"-c"|"--clean") cleanup=true ;;
"-j"|"--jobs") shift; jobs=$1 ;;
"-j"*) jobs=${1/-j} ;;
Expand Down Expand Up @@ -238,6 +238,12 @@ check_dependencies() {
command -v ${OBJDUMP} 2>/dev/null && break
done
fi

if [[ -z "${OBJSIZE:-}" ]]; then
for OBJSIZE in $(gen_bin_list llvm-size) llvm-size "${CROSS_COMPILE:-}"size; do
command -v ${OBJSIZE} 2>/dev/null && break
done
fi
}

# Optimistically check to see that the user has a llvm-ar
Expand Down Expand Up @@ -276,6 +282,7 @@ mako_reactor() {
LD="${LD}" \
NM="${NM}" \
OBJDUMP="${OBJDUMP}" \
OBJSIZE="${OBJSIZE}" \
"${@}"
}

Expand Down
5 changes: 5 additions & 0 deletions usage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ Environment variables:
common-4.14
common-4.9
common-4.4
OBJSIZE:
If no OBJSIZE value is specified, the script will attempt to set OBJSIZE
to llvm-size-10 llvm-size-9, llvm-size-8, llvm-size-7, llvm-size, then
${CROSS_COMPILE}size if they are found in PATH.


Optional parameters:
-c | --clean:
Expand Down