From feae5528a30c006b6e2f96a95116e20b983703fc Mon Sep 17 00:00:00 2001 From: Jia Tan Date: Wed, 11 Jan 2023 00:48:35 +0800 Subject: [PATCH] CI/CD: Add -f argument to set CFLAGS in ci_build.sh. For now, the suggested option is for -m32 only, but this can be updated later if other flags are deemed useful. --- build-aux/ci_build.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/build-aux/ci_build.sh b/build-aux/ci_build.sh index 85785d9f..8c309028 100755 --- a/build-aux/ci_build.sh +++ b/build-aux/ci_build.sh @@ -16,7 +16,7 @@ set -e -USAGE="Usage: $0 -b [autotools|cmake] -c [crc32|crc64|sha256] -d [encoders|decoders|bcj|delta|threads] -l [destdir] -s [srcdir] -p [all|build|test]" +USAGE="Usage: $0 -b [autotools|cmake] -c [crc32|crc64|sha256] -d [encoders|decoders|bcj|delta|threads] -l [destdir] -s [srcdir] -p [all|build|test] -f[-m32]" # Absolute path of script directory ABS_DIR=$(cd -- "$(dirname -- "$0")" && pwd) @@ -34,7 +34,7 @@ DEST_DIR="$SRC_DIR/../xz_build" PHASE="all" # Parse arguments -while getopts b:c:d:l:s:p: opt; do +while getopts b:c:d:l:s:p:f: opt; do # b option can have either value "autotools" OR "cmake" case ${opt} in b) @@ -77,6 +77,10 @@ while getopts b:c:d:l:s:p: opt; do ;; p) PHASE="$OPTARG" ;; + f) + CFLAGS="$OPTARG" + export CFLAGS + ;; esac done