autopackage: Use proper linker for the LTO builds under clang
Signed-off-by: Michal Berger <michalx.berger@intel.com> Change-Id: Ie7be39fb224fffbf36c02ceb1d9fe97491aba6e5 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10238 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
parent
c1aef9bb1b
commit
c8d1479873
@ -75,6 +75,11 @@ timing_enter build_release
|
||||
|
||||
config_params="$(get_config_params | sed 's/--enable-debug//g')"
|
||||
if [ $(uname -s) = Linux ]; then
|
||||
# LTO needs a special compiler to work under clang. See detect_cc.sh for details.
|
||||
if [[ $CC == *clang* ]]; then
|
||||
LD=$(type -P ld.gold)
|
||||
export LD
|
||||
fi
|
||||
./configure $config_params --enable-lto
|
||||
else
|
||||
# LTO needs a special compiler to work on BSD.
|
||||
|
Loading…
Reference in New Issue
Block a user