
Similar to previous PRs I've done to change some `IsCLMode` checks to `isWindowsMSVCEnvironment`. I stumbled into this one accidentally last week. I did some greps and I think this is the last one for now. All the remaining `IsCLMode` checks are only valid for the cl driver mode. For the `*-windows-msvc` target MSVC link.exe and lld are supported. LTO isn't supported with MSVC link.exe and so we error when lto is enabled but MSVC link.exe is being used. However we only error if the driver mode is cl. If we are using the clang driver with the `*-windows-msvc` target then ensure an error is also emitted when LTO and MSVC link.exe are used together.
16 lines
729 B
C
16 lines
729 B
C
// -flto=thin causes a switch to llvm-bc object files.
|
|
// RUN: %clang -ccc-print-phases -c %s -flto=thin 2> %t
|
|
// RUN: FileCheck -check-prefix=CHECK-COMPILE-ACTIONS < %t %s
|
|
//
|
|
// CHECK-COMPILE-ACTIONS: 2: compiler, {1}, ir
|
|
// CHECK-COMPILE-ACTIONS: 3: backend, {2}, lto-bc
|
|
|
|
// RUN: %clang -ccc-print-phases %if target={{.*-windows-msvc.*}} %{ -fuse-ld=lld %} -flto=thin %s 2> %t
|
|
// RUN: FileCheck -check-prefix=CHECK-COMPILELINK-ACTIONS < %t %s
|
|
//
|
|
// CHECK-COMPILELINK-ACTIONS: 0: input, "{{.*}}thinlto.c", c
|
|
// CHECK-COMPILELINK-ACTIONS: 1: preprocessor, {0}, cpp-output
|
|
// CHECK-COMPILELINK-ACTIONS: 2: compiler, {1}, ir
|
|
// CHECK-COMPILELINK-ACTIONS: 3: backend, {2}, lto-bc
|
|
// CHECK-COMPILELINK-ACTIONS: 4: linker, {3}, image
|