* lib/go-torture.exp: Only add lto to TORTURE_OPTIONS if it is
supported.
From-SVN: r270133
+2019-04-03 Clément Chigot <clement.chigot@atos.net>
+
+ * lib/go-torture.exp: Only add lto to TORTURE_OPTIONS if it is
+ supported.
+
2019-04-13 Christophe Lyon <christophe.lyon@linaro.org>
PR c/71598
{ -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.