1 // RUN: touch %t.o
2 //
3 // RUN: %clang -target x86_64-unknown-linux -### %t.o -flto 2>&1 \
4 // RUN:     -Wl,-plugin-opt=foo -O3 \
5 // RUN:     | FileCheck %s --check-prefix=CHECK-X86-64-BASIC
6 // CHECK-X86-64-BASIC: "-plugin" "{{.*}}/LLVMgold.so"
7 // CHECK-X86-64-BASIC: "-plugin-opt=O3"
8 // CHECK-X86-64-BASIC: "-plugin-opt=foo"
9 //
10 // RUN: %clang -target x86_64-unknown-linux -### %t.o -flto 2>&1 \
11 // RUN:     -march=corei7 -Wl,-plugin-opt=foo -Ofast \
12 // RUN:     | FileCheck %s --check-prefix=CHECK-X86-64-COREI7
13 // CHECK-X86-64-COREI7: "-plugin" "{{.*}}/LLVMgold.so"
14 // CHECK-X86-64-COREI7: "-plugin-opt=mcpu=corei7"
15 // CHECK-X86-64-COREI7: "-plugin-opt=O3"
16 // CHECK-X86-64-COREI7: "-plugin-opt=foo"
17 //
18 // RUN: %clang -target arm-unknown-linux -### %t.o -flto 2>&1 \
19 // RUN:     -march=armv7a -Wl,-plugin-opt=foo -O0 \
20 // RUN:     | FileCheck %s --check-prefix=CHECK-ARM-V7A
21 // CHECK-ARM-V7A: "-plugin" "{{.*}}/LLVMgold.so"
22 // CHECK-ARM-V7A: "-plugin-opt=mcpu=cortex-a8"
23 // CHECK-ARM-V7A: "-plugin-opt=O0"
24 // CHECK-ARM-V7A: "-plugin-opt=foo"
25 //
26 // RUN: %clang -target i686-linux-android -### %t.o -flto 2>&1 \
27 // RUN:     | FileCheck %s --check-prefix=CHECK-X86-ANDROID
28 // CHECK-X86-ANDROID: "-plugin" "{{.*}}/LLVMgold.so"
29