aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-04-10 15:41:08 +0100
committerLasse Collin <lasse.collin@tukaani.org>2024-04-11 00:15:35 +0300
commit65bf7e0a1ca6386f17608e8afb84ac470c18d23f (patch)
treeca933204ecfc2a200ab9d8b0b04270169fe634b6
parentci: make automake's test runner verbose on failures (diff)
downloadxz-65bf7e0a1ca6386f17608e8afb84ac470c18d23f.tar.xz
ci: default to -O2
We need this for when we're passing sanitizer flags or -gdwarf-4 for Clang with Valgrind. Just always start with -O2 if CFLAGS isn't set in the environment and append what was passed on the command line.
-rwxr-xr-xbuild-aux/ci_build.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/build-aux/ci_build.sh b/build-aux/ci_build.sh
index e92d88c9..da780f33 100755
--- a/build-aux/ci_build.sh
+++ b/build-aux/ci_build.sh
@@ -48,6 +48,7 @@ DEST_DIR="$SRC_DIR/../xz_build"
PHASE="all"
ARTIFACTS_DIR_NAME="output"
+[[ -z ${CFLAGS} ]] && export CFLAGS="-O2"
###################
# Parse arguments #
@@ -105,7 +106,7 @@ while getopts a:b:c:d:l:m:n:s:p:f:w:h opt; do
p) PHASE="$OPTARG"
;;
f)
- CFLAGS="$OPTARG"
+ CFLAGS+=" $OPTARG"
export CFLAGS
;;
w) WRAPPER="$OPTARG"