Commit b40a90a1 authored by Jan Kiene's avatar Jan Kiene
Browse files

add optim_level argument to build-binaries.sh

needed for e.g. building the basop codec with optimization and the
float codec without
parent c442ffae
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
#! /bin/bash

# helper script for building various typical configurations
# Usage: build-binaries.sh mode(float-ref|float-ref-merge-source|merge-target|dut) optim_level(0|1|2|3)

set -euxo pipefail

mode="${1:-}"
optim_level="${2:-0}"

case "$optim_level" in
0 | 1 | 2 | 3) ;;
*)
  echo "Error: invalid optim_level: $optim_level (allowed: 0,1,2,3)"
  exit 2
  ;;
esac

case "$mode" in
float-ref)
@@ -77,7 +89,7 @@ git checkout "$ref_to_check_out"
bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/activate-debug-mode-info-if-set.sh

make clean
make -j "$(nproc)" 2>&1 >$make_log_file
OPTIM=$optim_level make -j "$(nproc)" 2>&1 >$make_log_file

# avoid errors in mv when renaming to same file
mv IVAS_cod "${CI_PROJECT_DIR}/${ivas_cod_filename}"