1 ! Solaris ld doesn't support the linker plugin interface
2 ! UNSUPPORTED: system-windows, system-solaris
3 ! RUN: %flang -### -S %s 2>&1 | FileCheck %s --check-prefix=NO-LTO
4 ! RUN: %flang -### -S -fno-lto %s 2>&1 | FileCheck %s --check-prefix=NO-LTO
6 ! Full LTO and aliases.
7 ! RUN: %flang -### -S -flto %s 2>&1 | FileCheck %s --check-prefix=FULL-LTO
8 ! RUN: %flang -### -S -flto=full %s 2>&1 | FileCheck %s --check-prefix=FULL-LTO
9 ! RUN: %flang -### -S -flto=auto %s 2>&1 | FileCheck %s --check-prefix=FULL-LTO
10 ! RUN: %flang -### -S -flto=jobserver %s 2>&1 | FileCheck %s --check-prefix=FULL-LTO
12 ! Also check linker plugin opt for Thin LTO
13 ! RUN: %flang -### -flto=thin %s 2>&1 | FileCheck %s --check-prefix=THIN-LTO
15 ! RUN: not %flang -### -S -flto=somelto %s 2>&1 | FileCheck %s --check-prefix=ERROR
17 ! FC1 tests. Check that it does not crash.
18 ! RUN: %flang_fc1 -S %s -flto -o /dev/null
19 ! RUN: %flang_fc1 -S %s -flto=full -o /dev/null
20 ! RUN: %flang_fc1 -S %s -flto=thin -o /dev/null
26 ! FULL-LTO-SAME: "-flto=full"
28 ! THIN-LTO: flang-new: warning: the option '-flto=thin' is a work in progress
30 ! THIN-LTO-SAME: "-flto=thin"
31 ! THIN-LTO: "-plugin-opt=thinlto"
33 ! ERROR: error: unsupported argument 'somelto' to option '-flto=