Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Unified Diff: tools/clang/translation_unit/test_files/sysroot/README

Issue 1658553002: Check for system include paths by looking at clang's HeaderSearchOptions, (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add helpful comments Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/clang/translation_unit/test_files/sysroot/README
diff --git a/tools/clang/translation_unit/test_files/sysroot/README b/tools/clang/translation_unit/test_files/sysroot/README
new file mode 100644
index 0000000000000000000000000000000000000000..932835881f2e6a92987cd5d9af572486b286df42
--- /dev/null
+++ b/tools/clang/translation_unit/test_files/sysroot/README
@@ -0,0 +1,19 @@
+Clang looks for the presence of crtbegin.o to decide whether to add GCC standard
+C++ library directories to the system header lookup path.
+
+The presence of usr/lib/gcc/x86_64-linux-gnu/4.6/crtbegin.o and
+usr/include/c++/4.6 inside this sysroot will cause clang to add the following
+directories to the path:
+ - $SYSROOT/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6
+ - $SYSROOT/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/x86_64-linux-gnu/c++/4.6
+ - $SYSROOT/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/x86_64-unknown-linux-gnu/c++/4.6
+ - $SYSROOT/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/backward
+
+As well as the standard paths:
+ - $SYSROOT/usr/local/include
+ - $SYSROOT/include
+ - $SYSROOT/usr/include
+
+See clang's lib/Driver/ToolChains.cpp:
+ - FilterNonExistent: checks for crtbegin.o
+ - Linux::AddClangCXXStdlibIncludeArgs: looks for various c++ directories

Powered by Google App Engine
This is Rietveld 408576698