diff --git a/autopackage.sh b/autopackage.sh index 913b8078a..85274db7d 100755 --- a/autopackage.sh +++ b/autopackage.sh @@ -35,7 +35,7 @@ fi timing_enter build_release -./configure $(get_config_params) --disable-debug --enable-lto +./configure $(get_config_params) --disable-debug --enable-lto --disable-unit-tests $MAKE ${MAKEFLAGS} $MAKE ${MAKEFLAGS} clean diff --git a/configure b/configure index f49f6e50e..3e8f4b6df 100755 --- a/configure +++ b/configure @@ -494,6 +494,11 @@ if [[ "${CONFIG[ISAL]}" = "n" ]] && [[ "${CONFIG[REDUCE]}" = "y" ]]; then exit 1 fi +if [[ "${CONFIG[LTO]}" = "y" ]] && [[ "${CONFIG[UNIT_TESTS]}" = "y" ]]; then + echo "ERROR Conflicting options: --enable-lto is not compatible with --enable-unit-tests." + exit 1 +fi + if [ -z "${CONFIG[ENV]}" ]; then CONFIG[ENV]=$rootdir/lib/env_dpdk echo "Using default SPDK env in ${CONFIG[ENV]}"