From 7f77c0c9a77506be62cd0c96fbfc1c0c8b3d5220 Mon Sep 17 00:00:00 2001 From: Michal Gorny Date: Mon, 21 Jan 2019 17:05:43 +0000 Subject: [PATCH] [test] Pass -ccc-install-dir in mac compilation db test Pass -ccc-install-dir explicitly as the compilation database code does not pass argv[0] to getMainExecutable(), while some systems require it to return the correct path. Since the relevant code is apparently only applicable to Darwin, just pass correct -ccc-install-dir to make the tests pass on *BSD systems. Differential Revision: https://reviews.llvm.org/D56976 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351752 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../clang-check-mac-libcxx-fixed-compilation-db.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/Tooling/clang-check-mac-libcxx-fixed-compilation-db.cpp b/test/Tooling/clang-check-mac-libcxx-fixed-compilation-db.cpp index 3778c395cd..f6424380d7 100644 --- a/test/Tooling/clang-check-mac-libcxx-fixed-compilation-db.cpp +++ b/test/Tooling/clang-check-mac-libcxx-fixed-compilation-db.cpp @@ -10,6 +10,11 @@ // // RUN: cp clang-check %t/mock-libcxx/bin/ // RUN: cp %s %t/test.cpp -// RUN: "%t/mock-libcxx/bin/clang-check" -p %t %t/test.cpp -- -stdlib=libc++ -target x86_64-apple-darwin +// RUN: "%t/mock-libcxx/bin/clang-check" -p %t %t/test.cpp -- \ +// RUN: -stdlib=libc++ -target x86_64-apple-darwin \ +// RUN: -ccc-install-dir %t/mock-libcxx/bin +// +// ^ -ccc-install-dir passed to unbreak tests on *BSD where +// getMainExecutable() relies on real argv[0] being passed #include vector v; -- 2.50.1