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.
This commit is contained in:
Jia Tan 2023-01-11 00:48:35 +08:00
parent cfabb62a48
commit feae5528a3

View File

@ -16,7 +16,7 @@
set -e 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 # Absolute path of script directory
ABS_DIR=$(cd -- "$(dirname -- "$0")" && pwd) ABS_DIR=$(cd -- "$(dirname -- "$0")" && pwd)
@ -34,7 +34,7 @@ DEST_DIR="$SRC_DIR/../xz_build"
PHASE="all" PHASE="all"
# Parse arguments # 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" # b option can have either value "autotools" OR "cmake"
case ${opt} in case ${opt} in
b) b)
@ -77,6 +77,10 @@ while getopts b:c:d:l:s:p: opt; do
;; ;;
p) PHASE="$OPTARG" p) PHASE="$OPTARG"
;; ;;
f)
CFLAGS="$OPTARG"
export CFLAGS
;;
esac esac
done done