diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2019-04-03 18:21:38 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2019-04-03 18:21:38 +0000 |
commit | afe53b550a8c7658cd8749c06a40a0cc2493249b (patch) | |
tree | 2247b7aff8d94f5bf84790dc129ad9a116b1cec6 /gcc/testsuite/lib | |
parent | 5adb4def587ef2ac7b5f6b3ed225e001d6d0309c (diff) |
* lib/go-torture.exp: Only add lto to TORTURE_OPTIONS if it is
supported.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270133 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/lib')
-rw-r--r-- | gcc/testsuite/lib/go-torture.exp | 9 |
1 files changed, 6 insertions, 3 deletions
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. |