Skip to content

Commit bf8fe1c

Browse files
committed
Fix clang driver tests for cspgo in lld
The tests introduced by https://reviews.llvm.org/D151589 were failing because I guess some test platforms don't have `lld`. Similar tests add `-B%S/Inputs/lld` to the clang commands so lets try this here to fix the tests. ``` clang: error: invalid linker name in argument '-fuse-ld=lld' ```
1 parent 7eebfdd commit bf8fe1c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

clang/test/Driver/cspgo-lto.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55

66
// CHECK: -plugin-opt=cs-profile-path=default.profdata
77

8-
// RUN: %clang --target=apple-arm64-ios -### %t.o -flto=thin -fuse-ld=lld -fprofile-use 2>&1 | FileCheck %s --check-prefix=DARWIN-USE1
9-
// RUN: %clang --target=apple-arm64-ios -### %t.o -flto=thin -fuse-ld=lld -fprofile-use=a.profdata 2>&1 | FileCheck %s --check-prefix=DARWIN-USE2
8+
// RUN: %clang --target=apple-arm64-ios -### %t.o -flto=thin -fuse-ld=lld -B%S/Inputs/lld -fprofile-use 2>&1 | FileCheck %s --check-prefix=DARWIN-USE1
9+
// RUN: %clang --target=apple-arm64-ios -### %t.o -flto=thin -fuse-ld=lld -B%S/Inputs/lld -fprofile-use=a.profdata 2>&1 | FileCheck %s --check-prefix=DARWIN-USE2
1010

1111
// DARWIN-USE1: "--cs-profile-path=default.profdata"
1212
// DARWIN-USE2: "--cs-profile-path=a.profdata"
1313

14-
// RUN: %clang --target=apple-arm64-ios -### %t.o -flto=thin -fuse-ld=lld -fcs-profile-generate 2>&1 | FileCheck %s --check-prefix=DARWIN-GEN1
15-
// RUN: %clang --target=apple-arm64-ios -### %t.o -flto=thin -fuse-ld=lld -fcs-profile-generate=directory 2>&1 | FileCheck %s --check-prefix=DARWIN-GEN2
14+
// RUN: %clang --target=apple-arm64-ios -### %t.o -flto=thin -fuse-ld=lld -B%S/Inputs/lld -fcs-profile-generate 2>&1 | FileCheck %s --check-prefix=DARWIN-GEN1
15+
// RUN: %clang --target=apple-arm64-ios -### %t.o -flto=thin -fuse-ld=lld -B%S/Inputs/lld -fcs-profile-generate=directory 2>&1 | FileCheck %s --check-prefix=DARWIN-GEN2
1616

1717
// DARWIN-GEN1: "--cs-profile-generate"
1818
// DARWIN-GEN1-SAME: "--cs-profile-path=default_%m.profraw"

0 commit comments

Comments
 (0)