Skip to content

Commit

Permalink
CI: ci_build.sh allows configuring small build.
Browse files Browse the repository at this point in the history
  • Loading branch information
JiaT75 committed Apr 25, 2023
1 parent 78ccd93 commit 16b81a0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion build-aux/ci_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ set -e
USAGE="Usage: $0
-b [autotools|cmake]
-c [crc32|crc64|sha256]
-d [encoders|decoders|bcj|delta|threads|shared|nls]
-d [encoders|decoders|bcj|delta|threads|shared|nls|small]
-f [CFLAGS]
-l [destdir]
-n [ARTIFACTS_DIR_NAME]
Expand All @@ -39,6 +39,7 @@ DECODERS="y"
THREADS="y"
SHARED="y"
NATIVE_LANG_SUPPORT="y"
SMALL="n"
SRC_DIR="$ABS_DIR/../"
DEST_DIR="$SRC_DIR/../xz_build"
PHASE="all"
Expand Down Expand Up @@ -78,6 +79,7 @@ while getopts b:c:d:l:n:s:p:f:h opt; do
threads) THREADS="n" ;;
shared) SHARED="n";;
nls) NATIVE_LANG_SUPPORT="n";;
small) SMALL="y";;
*) echo "Invalid disable value: $disable_arg"; exit 1 ;;
esac
done
Expand Down Expand Up @@ -194,6 +196,7 @@ then
add_extra_option "$THREADS" "" "--disable-threads"
add_extra_option "$SHARED" "" "--disable-shared"
add_extra_option "$NATIVE_LANG_SUPPORT" "" "--disable-nls"
add_extra_option "$SMALL" "--enable-small" ""

# Run configure script
"$SRC_DIR"/configure --enable-werror --enable-checks="$CHECK_TYPE" $EXTRA_OPTIONS --config-cache
Expand All @@ -218,6 +221,8 @@ then
# CMake disables the shared library by default.
add_extra_option "$SHARED" "-DBUILD_SHARED_LIBS=ON" ""

add_extra_option "$SMALL" "-DHAVE_SMALL=ON" ""

# Remove old cache file to clear previous settings.
rm -f "CMakeCache.txt"
cmake "$SRC_DIR/CMakeLists.txt" -B "$DEST_DIR" $EXTRA_OPTIONS -DADDITIONAL_CHECK_TYPES="$CHECK_TYPE"
Expand Down

0 comments on commit 16b81a0

Please sign in to comment.