[PATCH] D56976: [clang] [test] Pass -ccc-install-dir in mac compilation db test

Michał Górny via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 20 05:48:21 PST 2019


mgorny created this revision.
mgorny added reviewers: krytarowski, sammccall, hokein, ilya-biryukov, rnk.

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.


Repository:
  rC Clang

https://reviews.llvm.org/D56976

Files:
  test/Tooling/clang-check-mac-libcxx-fixed-compilation-db.cpp


Index: test/Tooling/clang-check-mac-libcxx-fixed-compilation-db.cpp
===================================================================
--- test/Tooling/clang-check-mac-libcxx-fixed-compilation-db.cpp
+++ test/Tooling/clang-check-mac-libcxx-fixed-compilation-db.cpp
@@ -10,6 +10,8 @@
 //
 // 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
 #include <mock_vector>
 vector v;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56976.182701.patch
Type: text/x-patch
Size: 672 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190120/07befd79/attachment.bin>


More information about the cfe-commits mailing list