|
1 | 1 | // RUN: %clang --target=x86_64-unknown-linux-gnu -flto -ffat-lto-objects -### %s -c 2>&1 | FileCheck %s -check-prefix=CHECK-CC |
| 2 | +// RUN: %clang --target=i386-pc-win32 -flto -ffat-lto-objects -### %s -c 2>&1 | FileCheck %s -check-prefix=CHECK-CC |
2 | 3 | // CHECK-CC: -cc1 |
3 | 4 | // CHECK-CC-SAME: -emit-obj |
4 | 5 | // CHECK-CC-SAME: -ffat-lto-objects |
5 | 6 |
|
6 | 7 | /// Without -flto -S will just emit normal ASM, so we don't expect -emit-{llvm,obj} or -ffat-lto-objects to be passed to cc1. |
7 | 8 | // RUN: %clang --target=x86_64-unknown-linux-gnu -ffat-lto-objects -### %s -S 2>&1 | FileCheck %s -check-prefix=CHECK-CC-S |
| 9 | +// RUN: %clang --target=i386-pc-win32 -ffat-lto-objects -### %s -S 2>&1 | FileCheck %s -check-prefix=CHECK-CC-S |
8 | 10 | // CHECK-CC-S: -cc1 |
9 | 11 | // CHECK-CC-S: -S |
10 | 12 | // CHECK-CC-S-NOT: -emit-obj |
|
13 | 15 |
|
14 | 16 | /// When fat LTO is enabled with -S, we expect asm output and -ffat-lto-objects to be passed to cc1. |
15 | 17 | // RUN: %clang --target=x86_64-unknown-linux-gnu -flto -ffat-lto-objects -### %s -S 2>&1 | FileCheck %s -check-prefix=CHECK-CC-S-LTO |
| 18 | +// RUN: %clang --target=i386-pc-win32 -flto -ffat-lto-objects -### %s -S 2>&1 | FileCheck %s -check-prefix=CHECK-CC-S-LTO |
16 | 19 | // CHECK-CC-S-LTO: -cc1 |
17 | 20 | // CHECK-CC-S-NOT: -emit-llvm |
18 | 21 | // CHECK-CC-S-LTO-SAME: -ffat-lto-objects |
19 | 22 |
|
20 | 23 | /// When fat LTO is enabled with -S and -emit-llvm, we expect IR output and -ffat-lto-objects to be passed to cc1. |
21 | 24 | // RUN: %clang --target=x86_64-unknown-linux-gnu -flto -ffat-lto-objects -### %s -S -emit-llvm 2>&1 | FileCheck %s -check-prefix=CHECK-CC-S-EL-LTO |
| 25 | +// RUN: %clang --target=i386-pc-win32 -flto -ffat-lto-objects -### %s -S -emit-llvm 2>&1 | FileCheck %s -check-prefix=CHECK-CC-S-EL-LTO |
22 | 26 | // CHECK-CC-S-EL-LTO: -cc1 |
23 | 27 | // CHECK-CC-S-EL-LTO-SAME: -emit-llvm |
24 | 28 | // CHECK-CC-S-EL-LTO-SAME: -ffat-lto-objects |
25 | 29 |
|
26 | 30 | /// When fat LTO is enabled without -S we expect native object output and -ffat-lto-object to be passed to cc1. |
27 | 31 | // RUN: %clang --target=x86_64-unknown-linux-gnu -flto -ffat-lto-objects -### %s -c 2>&1 | FileCheck %s -check-prefix=CHECK-CC-C-LTO |
| 32 | +// RUN: %clang --target=i386-pc-win32 -flto -ffat-lto-objects -### %s -c 2>&1 | FileCheck %s -check-prefix=CHECK-CC-C-LTO |
28 | 33 | // CHECK-CC-C-LTO: -cc1 |
29 | 34 | // CHECK-CC-C-LTO-SAME: -emit-obj |
30 | 35 | // CHECK-CC-C-LTO-SAME: -ffat-lto-objects |
31 | 36 |
|
32 | 37 | /// When fat LTO is enabled with -c and -emit-llvm we expect bitcode output and -ffat-lto-object to be passed to cc1. |
33 | 38 | // RUN: %clang --target=x86_64-unknown-linux-gnu -flto -ffat-lto-objects -### %s -c -emit-llvm 2>&1 | FileCheck %s -check-prefix=CHECK-CC-C-EL-LTO |
| 39 | +// RUN: %clang --target=i386-pc-win32 -flto -ffat-lto-objects -### %s -c -emit-llvm 2>&1 | FileCheck %s -check-prefix=CHECK-CC-C-EL-LTO |
34 | 40 | // CHECK-CC-C-EL-LTO: -cc1 |
35 | 41 | // CHECK-CC-C-EL-LTO-SAME: -emit-llvm-bc |
36 | 42 | // CHECK-CC-C-EL-LTO-SAME: -ffat-lto-objects |
37 | 43 |
|
38 | 44 | /// Make sure we don't have a warning for -ffat-lto-objects being unused |
39 | 45 | // RUN: %clang --target=x86_64-unknown-linux-gnu -ffat-lto-objects -fdriver-only -Werror -v %s -c 2>&1 | FileCheck %s -check-prefix=CHECK-CC-NOLTO |
| 46 | +// RUN: %clang --target=i386-pc-win32 -ffat-lto-objects -fdriver-only -Werror -v %s -c 2>&1 | FileCheck %s -check-prefix=CHECK-CC-NOLTO |
40 | 47 | // CHECK-CC-NOLTO: -cc1 |
41 | 48 | // CHECK-CC-NOLTO-SAME: -emit-obj |
42 | 49 | // CHECK-CC-NOLTO-NOT: -ffat-lto-objects |
43 | 50 |
|
44 | 51 | // RUN: %clang --target=x86_64-unknown-linux-gnu -flto -ffat-lto-objects -fno-fat-lto-objects -### %s -c 2>&1 | FileCheck %s -check-prefix=CHECK-CC-NOLTO |
| 52 | +// RUN: %clang --target=i386-pc-win32 -flto -ffat-lto-objects -fno-fat-lto-objects -### %s -c 2>&1 | FileCheck %s -check-prefix=CHECK-CC-NOLTO |
45 | 53 |
|
46 | 54 | /// We need to pass an additional flag (--fat-lto-objects) to lld when linking w/ -flto -ffat-lto-objects |
47 | 55 | /// But it should not be there when LTO is disabled w/ -fno-lto |
|
0 commit comments