autopackage: Don't build unit tests with lto.

Some of the unittests require symbols that don't work well
with the lto option. For example when you build reduce_ut.c
with the lto option, the __wrap_unlink symbol cannot be found.

Also, while we are here, add a check to configure for unit tests
built with lto.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2055 (master)

(cherry picked from commit 3ef6d0613d)
Change-Id: Iaf76cd050565ce2ff13b4230d7a3b735fd5384a6
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2076
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Seth Howell 2020-04-27 10:18:24 -07:00 committed by Tomasz Zawadzki
parent b47e2267cf
commit d8f54aed9a
2 changed files with 6 additions and 1 deletions

View File

@ -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

5
configure vendored
View File

@ -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]}"