// RUN: -fsanitize=address %s -o %t.o 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-ASAN %s
-// CHECK-ASAN: "{{.*}}ld"
+// CHECK-ASAN: "{{.*}}ld{{(.exe)?}}"
// CHECK-ASAN: libclang_rt.asan_osx.a"
// CHECK-ASAN: "-lstdc++"
// CHECK-ASAN: "-framework" "CoreFoundation"
// RUN: -fPIC -shared -fsanitize=address %s -o %t.so 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-DYN-ASAN %s
-// CHECK-DYN-ASAN: "{{.*}}ld"
+// CHECK-DYN-ASAN: "{{.*}}ld{{(.exe)?}}"
// CHECK-DYN-ASAN: "-dylib"
// CHECK-DYN-ASAN-NOT: libclang_rt.asan_osx.a
// CHECK-DYN-ASAN: "-undefined"
// RUN: -fsanitize=undefined %s -o %t.o 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-UBSAN %s
-// CHECK-UBSAN: "{{.*}}ld"
+// CHECK-UBSAN: "{{.*}}ld{{(.exe)?}}"
// CHECK-UBSAN: libclang_rt.ubsan_osx.a"
// CHECK-UBSAN: "-lstdc++"
// RUN: -fPIC -shared -fsanitize=undefined %s -o %t.so 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-DYN-UBSAN %s
-// CHECK-DYN-UBSAN: "{{.*}}ld"
+// CHECK-DYN-UBSAN: "{{.*}}ld{{(.exe)?}}"
// CHECK-DYN-UBSAN: "-dylib"
// CHECK-DYN-UBSAN-NOT: libclang_rt.ubsan_osx.a
// CHECK-DYN-UBSAN: "-undefined"