[clang] [clang] [Driver] Ensure we error on lto with link.exe and target `*-windows-msvc` on non cl driver modes (PR #109607)

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Sun Sep 22 23:10:44 PDT 2024


================
@@ -605,7 +605,7 @@
 // RUN: %clang -### -S -fjmc -g -fno-jmc -target x86_64-pc-windows-msvc %s 2>&1 | FileCheck -check-prefix=CHECK_NOJMC %s
 // RUN: %clang -### -S -fjmc -g -target x86_64-unknown-linux %s 2>&1 | FileCheck -check-prefix=CHECK_JMC %s
 // RUN: %clang -### -S -fjmc -g -fno-jmc -target x86_64-unknown-linux %s 2>&1 | FileCheck -check-prefix=CHECK_NOJMC %s
-// RUN: %clang -### -fjmc -g -flto -target x86_64-pc-windows-msvc %s 2>&1 | FileCheck -check-prefix=CHECK_NOJMC_LTO %s
+// RUN: %clang -### -fjmc -g -flto -fuse-ld=lld -target x86_64-pc-windows-msvc %s 2>&1 | FileCheck -check-prefix=CHECK_NOJMC_LTO %s
----------------
MaskRay wrote:

`-fuse-ld=lld` would lead to a failure if lld is not found in program paths. This failure happens on Linux, not sure about Windows.

https://github.com/llvm/llvm-project/pull/109607


More information about the cfe-commits mailing list