From: Clément Chigot Date: Wed, 3 Apr 2019 18:21:38 +0000 (+0000) Subject: go-torture.exp: Only add lto to TORTURE_OPTIONS if it is supported. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c1d9a8f5904a22f2e1e8ec8f52a9dde30c560809;p=gcc.git go-torture.exp: Only add lto to TORTURE_OPTIONS if it is supported. * lib/go-torture.exp: Only add lto to TORTURE_OPTIONS if it is supported. From-SVN: r270133 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2473b2557ef..eaee0a304a3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-04-03 Clément Chigot + + * lib/go-torture.exp: Only add lto to TORTURE_OPTIONS if it is + supported. + 2019-04-13 Christophe Lyon PR c/71598 diff --git a/gcc/testsuite/lib/go-torture.exp b/gcc/testsuite/lib/go-torture.exp index a7eca184416..097bb9737e7 100644 --- a/gcc/testsuite/lib/go-torture.exp +++ b/gcc/testsuite/lib/go-torture.exp @@ -34,10 +34,13 @@ if ![info exists TORTURE_OPTIONS] { { -O2 -fomit-frame-pointer -finline-functions -funroll-loops } \ { -O2 -fbounds-check } \ { -O3 -g } \ - { -Os } \ - { -flto }] -} + { -Os }] + if [check_effective_target_lto] { + set TORTURE_OPTIONS \ + [concat $TORTURE_OPTIONS [list {-flto}]] + } +} # # go-torture-compile -- compile a go.go-torture testcase.