]> granicus.if.org Git - clang/commitdiff
[PS4] Fix the unit test to be compatible with clang driver. NFC
authorSumanth Gundapaneni <sgundapa@codeaurora.org>
Wed, 16 Dec 2015 20:18:12 +0000 (20:18 +0000)
committerSumanth Gundapaneni <sgundapa@codeaurora.org>
Wed, 16 Dec 2015 20:18:12 +0000 (20:18 +0000)
".exe" extension is inherently checked by llvm::fs::can_execute()
This patch fixes the linker extension in clang driver and updates the
unit test to accommodate the the check string on windows.

Differential Revision:http://reviews.llvm.org/D15577

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@255814 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/Tools.cpp
test/Driver/sanitizer-ld.c

index dc125d638989ab5cdb43a8cbb671eb965ba3b7a0..41a4e9a51c8a07b9419af45a097b82341839d3a4 100644 (file)
@@ -10440,7 +10440,7 @@ static void ConstructGoldLinkJob(const Tool &T, Compilation &C,
 
   const char *Exec =
 #ifdef LLVM_ON_WIN32
-      Args.MakeArgString(ToolChain.GetProgramPath("ps4-ld.gold.exe"));
+      Args.MakeArgString(ToolChain.GetProgramPath("ps4-ld.gold"));
 #else
       Args.MakeArgString(ToolChain.GetProgramPath("ps4-ld"));
 #endif
index ad30ca390d9bd665cb05ebeac3fe5d7a42a808bd..4a9b2f74713540960131c3ee15d9e244e26b107c 100644 (file)
 // RUN:     -target x86_64-scei-ps4 \
 // RUN:     -shared \
 // RUN:   | FileCheck --check-prefix=CHECK-UBSAN-PS4 %s
-// CHECK-UBSAN-PS4: "{{.*}}ld{{(.exe)?}}"
+// CHECK-UBSAN-PS4: "{{.*}}ld{{(.gold)?(.exe)?}}"
 // CHECK-UBSAN-PS4: -lSceDbgUBSanitizer_stub_weak
 
 // RUN: %clang -fsanitize=address %s -### -o %t.o 2>&1 \
 // RUN:     -target x86_64-scei-ps4 \
 // RUN:     -shared \
 // RUN:   | FileCheck --check-prefix=CHECK-ASAN-PS4 %s
-// CHECK-ASAN-PS4: "{{.*}}ld{{(.exe)?}}"
+// CHECK-ASAN-PS4: "{{.*}}ld{{(.gold)?(.exe)?}}"
 // CHECK-ASAN-PS4: -lSceDbgAddressSanitizer_stub_weak
 
 // RUN: %clang -fsanitize=address,undefined %s -### -o %t.o 2>&1 \
 // RUN:     -target x86_64-scei-ps4 \
 // RUN:     -shared \
 // RUN:   | FileCheck --check-prefix=CHECK-AUBSAN-PS4 %s
-// CHECK-AUBSAN-PS4: "{{.*}}ld{{(.exe)?}}"
+// CHECK-AUBSAN-PS4: "{{.*}}ld{{(.gold)?(.exe)?}}"
 // CHECK-AUBSAN-PS4: -lSceDbgAddressSanitizer_stub_weak