| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
If the "<id>" is "gnu-c" or "msvc-c" then run the given compiler command
line on a C source file instead of C++. This allows C language settings
of the given compiler to be detected.
|
|
|
|
|
| |
Define some of the compiler-identifying macros actually defined by GNU
and MSVC compilers.
|
|
|
|
|
| |
Add test cases for the changes in commit 3c777ef360 (Detect: Improve
target triple selection, 2015-04-16).
|
|
|
|
|
| |
These macros are builtin to Clang so we should not try to use any such
definitions detected from the compiler.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We need implementation-provided headers to come from Clang to match what
is really built in to the parser. When not using --castxml-cc-<id>, the
Clang driver adds its builtin include directory in methods like
Linux::AddClangSystemIncludeArgs
MSVCToolChain::AddClangSystemIncludeArgs
CrossWindowsToolChain::AddClangSystemIncludeArgs
(see lib/Driver/*ToolChain*.cpp). When using --castxml-cc-<id>, we must
add the Clang builtin include dir in the appropriate place.
GNU-like compilers should have a builtin include directory too,
providing files like <emmintrin.h>. The Clang driver does not add this
directory from GCC toolchains and instead adds its own builtin include
directory. In this case, replace the detected compiler builtin include
directory with ours.
MSVC-like compilers have no separate builtin include directory. The
Clang driver simply places its own builtin include direcory before the
system include directory read from the INCLUDE environment variable. In
this case, do the same.
|
|
Create dummy gnu-like and msvc-like compiler binaries. Use them with
the --castxml-cc-<id> options to verify that the preprocessor
definitions and include directories are detected as expected.
|