Commit 3ef6d061 authored by Seth Howell's avatar Seth Howell Committed by Tomasz Zawadzki
Browse files

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: default avatarSeth Howell <seth.howell@intel.com>
Change-Id: Iaf76cd050565ce2ff13b4230d7a3b735fd5384a6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2055


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@mellanox.com>
parent f74fdce9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 −0
Original line number Diff line number Diff line
@@ -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]}"