2 ; RUN: rm -fr %T/savetemps-colon
3 ; RUN: mkdir %T/savetemps-colon
4 ; RUN: opt -thinlto-bc -o %T/savetemps-colon/savetemps.obj %s
5 ; RUN: opt -thinlto-bc -o %T/savetemps-colon/thin1.obj %S/Inputs/thinlto.ll
8 ; RUN: lld-link /lldsavetemps:preopt /out:%T/savetemps-colon/savetemps.exe /entry:main \
9 ; RUN: /subsystem:console %T/savetemps-colon/savetemps.obj %T/savetemps-colon/thin1.obj
10 ; RUN: ls %T/savetemps-colon/*.obj.*.preopt.bc | count 2
13 ; RUN: lld-link /lldsavetemps:promote /out:%T/savetemps-colon/savetemps.exe /entry:main \
14 ; RUN: /subsystem:console %T/savetemps-colon/savetemps.obj %T/savetemps-colon/thin1.obj
15 ; RUN: ls %T/savetemps-colon/*.obj.*.promote.bc | count 2
18 ; RUN: lld-link /lldsavetemps:internalize /out:%T/savetemps-colon/savetemps.exe /entry:main \
19 ; RUN: /subsystem:console %T/savetemps-colon/savetemps.obj %T/savetemps-colon/thin1.obj
20 ; RUN: ls %T/savetemps-colon/*.obj.*.internalize.bc | count 2
23 ; RUN: lld-link /lldsavetemps:import /out:%T/savetemps-colon/savetemps.exe /entry:main \
24 ; RUN: /subsystem:console %T/savetemps-colon/savetemps.obj %T/savetemps-colon/thin1.obj
25 ; RUN: ls %T/savetemps-colon/*.obj.*.import.bc | count 2
28 ;; Not supported on Windows due to difficulty with escaping "opt" across platforms.
31 ; RUN: lld-link /lldsavetemps:precodegen /out:%T/savetemps-colon/savetemps.exe /entry:main \
32 ; RUN: /subsystem:console %T/savetemps-colon/savetemps.obj %T/savetemps-colon/thin1.obj
33 ; RUN: ls %T/savetemps-colon/*.obj.*.precodegen.bc | count 2
35 ;; Check combinedindex
36 ; RUN: lld-link /lldsavetemps:combinedindex /out:%T/savetemps-colon/savetemps.exe /entry:main \
37 ; RUN: /subsystem:console %T/savetemps-colon/savetemps.obj %T/savetemps-colon/thin1.obj
38 ; RUN: ls %T/savetemps-colon/*.exe.index.bc | count 1
41 ; RUN: lld-link /lldsavetemps:prelink /out:%T/savetemps-colon/savetemps.exe /entry:main \
42 ; RUN: /subsystem:console %T/savetemps-colon/savetemps.obj %T/savetemps-colon/thin1.obj
43 ; RUN: ls %T/savetemps-colon/*.exe.lto.*.obj | count 2
46 ; RUN: lld-link /lldsavetemps:resolution /out:%T/savetemps-colon/savetemps.exe /entry:main \
47 ; RUN: /subsystem:console %T/savetemps-colon/savetemps.obj %T/savetemps-colon/thin1.obj
48 ; RUN: ls %T/savetemps-colon/*.resolution.txt | count 1
50 ;; Check error message
51 ; RUN: not lld-link /lldsavetemps:notastage /out:%T/savetemps-colon/savetemps.exe /entry:main \
52 ; RUN: /subsystem:console %T/savetemps-colon/savetemps.obj %T/savetemps-colon/thin1.obj 2>&1 \
54 ; CHECK: unknown /lldsavetemps value: notastage
56 target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
57 target triple = "x86_64-pc-windows-msvc"