summaryrefslogtreecommitdiff
path: root/build-aux
diff options
context:
space:
mode:
authorJia Tan <jiat0218@gmail.com>2023-01-11 00:48:35 +0800
committerJia Tan <jiat0218@gmail.com>2023-01-11 00:48:35 +0800
commitfeae5528a30c006b6e2f96a95116e20b983703fc (patch)
treefaeef6df59345ab121e9190da12b245cfc12a8b9 /build-aux
parentcfabb62a4874c146e7d6f30445637602545bc054 (diff)
downloadxz-feae5528a30c006b6e2f96a95116e20b983703fc.tar.gz
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.
Diffstat (limited to 'build-aux')
-rwxr-xr-xbuild-aux/ci_build.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/build-aux/ci_build.sh b/build-aux/ci_build.sh
index 85785d9..8c30902 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