Граф коммитов

89 Коммитов

Автор SHA1 Сообщение Дата
Jordan Rose 549a292b54 CMake: -Wno-nested-anon-types for Clang.
In LLVM, -pedantic is not set unless LLVM_ENABLE_PEDANTIC is set.
However, Clang's CMakeLists.txt unilaterally adds -pedantic to the run
line, so we need to disable -Wnested-anon-types explicitly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176393 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-02 00:49:47 +00:00
Alexey Samsonov 863fb35744 Define CMake option CLANG_INCLUDE_TESTS *before* traversing into tests/ subdirectory. Otherwise, while configuring the build tree for the first time, Clang unit tests could avoid being added to 'check-clang' command, and thus avoid being built and executed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176080 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-26 09:43:27 +00:00
Jordan Rose 6bbaa77251 CMake: Include Clang unit tests in check-clang target in standalone builds.
Also, remove CLANG_BUILD_TESTS option. It won't have consistent behavior
between standalone and non-standalone builds, so I'm not going to bother
hooking it up for standalone builds. LLVM_BUILD_TESTS will continue to
control unit test inclusion in the "all" target in non-standalone builds.

Finally, fix the default value of CLANG_INCLUDE_TESTS, which was being set
to the boolean value of "LLVM_INCLUDE_TESTS", i.e. OFF, rather than actually
reading the variable ${LLVM_INCLUDE_TESTS}! If you picked up my earlier
commit, YOU WILL HAVE TO MANUALLY SET THIS OPTION BACK ON. My apologies!

Part two of r174691 (allow the unit tests to be built in standalone mode).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174698 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 07:28:25 +00:00
Jordan Rose 3092d9da06 CMake: Optionally allow running the Clang unit tests in standalone builds.
The reason this is not enabled by default is because there is no way for
Clang to guarantee that the LLVM unit testing infrastruture has been built.
However, if it /has/ been built, there's no reason why the standalone Clang
build can't use it!

This should have no effect on existing builds -- in a combined build the
value of the CLANG_INCLUDE_TESTS option defaults to the LLVM equivalent,
and in a standalone build it defaults to off.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174691 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08 01:42:37 +00:00
Douglas Gregor a34173e678 CMake: Make sure to detect LibXml2 when Clang is built standalone
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170444 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-18 19:39:40 +00:00
NAKAMURA Takumi af0e889e7e [CMake] Move libxml2 stuff from clang to llvm/cmake.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170225 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-14 18:30:20 +00:00
NAKAMURA Takumi 68f22af4ea Update CMake build corresponding to r170135.
Thanks to Saleem Abdulrasool, aka compnerd!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170136 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-13 16:24:59 +00:00
Jordan Rose 340d0d3001 CMake: Fix public header search for generating Xcode/MSVC projects.
Previously, we only had support for one level of library under lib/,
with the existence of the two-level lib/StaticAnalyzer/* hardcoded in
the top-level CMakeLists.txt. This became a problem with split of
libRewrite into several libraries -- with the same sub-names as the
libraries in lib/StaticAnalyzer/.

Now, we match up anything under lib/ to the corresponding directory
in include/clang/.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166505 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-23 21:54:03 +00:00
Douglas Gregor 62d20a75f5 Fix capitalization of LibXml2 for CMake on case-sensitive file systems
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161445 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-07 20:42:31 +00:00
Dmitri Gribenko f303d4cb10 libclang API for comment-to-xml conversion.
The implementation also includes a Relax NG schema and tests for the schema
itself.  The schema is used in c-index-test to verify that XML documents we
produce are valid.  In order to do the validation, we add an optional libxml2
dependency for c-index-test.

Credits for CMake part go to Doug Gregor.  Credits for Autoconf part go to Eric
Christopher.  Thanks!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161431 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-07 17:54:38 +00:00
NAKAMURA Takumi e3120ae6eb clang/CMakeLists.txt: Move "examples" after building lib and tools.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160848 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-27 06:17:48 +00:00
NAKAMURA Takumi 2964ffed26 [CMake] Get rid of unconditional dependency to ClangDiagnosticCommon. Only clangBasic and clangASTMatchers need it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159931 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-09 14:12:20 +00:00
Chandler Carruth 9224fb88ff Clone a bit of LIT flag defaults from the LLVM CMake file into the
standalone section of the Clang CMake files.

This will likely make the lit runs in Clang much more suitable to IDEs
such as Xcode and MSVC when operating in a standalone mode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159582 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-02 20:52:55 +00:00
Chandler Carruth b0d8671f95 Remove a goofy CMake hack and use the standard CMake facilities to
express library-level dependencies within Clang.

This is no more verbose really, and plays nicer with the rest of the
CMake facilities. It should also have no change in functionality.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158888 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-21 01:30:21 +00:00
Francois Pichet a08e7bc74b Zap the /Za compiler switch from MSVC projects, the option is considered harmful even by Microsoft people and clang won't build using the MSVC 2012 RC if not removed.
Only 1 minor code change was necessary: can't use cdecl as variable name anymore.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158063 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-06 12:00:10 +00:00
Sebastian Pop 4762a2da74 use DEFAULT_SYSROOT
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154792 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-16 04:16:43 +00:00
NAKAMURA Takumi ee7a1981c6 CMake: install libclang.dll to $CMAKE_INSTALL_PREFIX/bin.
Patch by Joe Groff.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151448 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-25 16:46:50 +00:00
Dylan Noblesmith cc8a94565e include clang's config.h unconditionally (v2)
And remove HAVE_CLANG_CONFIG_H, now that the header is generated
in the autoconf build, too.

Reverts r149571/restores r149504, now that config.h is generated
correctly by LLVM's configure in all build configurations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150487 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-14 15:54:49 +00:00
Dylan Noblesmith f2462be34a back out r149504
Too many weird build failures.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149571 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-02 00:40:14 +00:00
Dylan Noblesmith eafa50bbdf cmake: don't install config.h (v2)
This header is private and shouldn't be used by clients.

(This reverts r149540, reinstating r149496. False alarm.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149550 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-01 22:22:37 +00:00
Dylan Noblesmith 3f405d3606 cmake: revert r149496
It *looks* like this caused PR11903, somehow.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149540 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-01 21:17:55 +00:00
Dylan Noblesmith 69d3b4f7c9 include clang's config.h unconditionally
And remove HAVE_CLANG_CONFIG_H, now that the header is generated
in the autoconf build, too. (clang r149497 / llvm r149498)

Also include the config.h header after all other headers, per
the LLVM coding standards.

It also turns out WindowsToolChain.cpp wasn't using the config
header at all, so that include's just deleted now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149504 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-01 14:25:28 +00:00
Dylan Noblesmith f9b6e97638 cmake: don't install config.h
This header is private and shouldn't be used by clients.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149496 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-01 13:50:22 +00:00
Peter Collingbourne e26198c098 Adjust CLANG_BUILD_EXAMPLES to mean whether the examples are built
by default, rather than whether they may be built at all.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149037 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-26 03:33:40 +00:00
Peter Collingbourne 51d7777a21 Add the Clang tblgen backends to Clang, and flip the switch to cause
the build systems to use clang-tblgen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141291 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-06 13:03:08 +00:00
Peter Collingbourne 6ee5b93845 Clang-side build system infrastructure for multiple tblgens.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141267 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-06 01:52:10 +00:00
NAKAMURA Takumi d41f3d8bd2 CMake: Define ${LLVM_TABLEGEN_EXE} with explicit ${CMAKE_EXECUTABLE_SUFFIX} on standalone build. Or build might fail with NMake.
Thanks to Nicolas Le Gland!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140360 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-23 00:52:55 +00:00
Chad Rosier fc6142779f Fix cmake for r136702 (at least for the most part). Chandler has been kind
enough to offer to investigate the underlying issue.  Thanks to Doug for his
assistance as well.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136719 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-02 20:44:34 +00:00
Chad Rosier 4068eaaec4 Temporarily revert parts of r136702 to make cmake builds happy.
Someone with more cmake experience want to throw me a bone? :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136709 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-02 18:33:29 +00:00
Chad Rosier 2b81910618 When the compiler crashes, the compiler driver now produces diagnostic
information including the fully preprocessed source file(s) and command line 
arguments.  The developer is asked to attach this diagnostic information to a 
bug report.
rdar://9575623


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136702 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-02 17:58:04 +00:00
Douglas Gregor 17031a25f7 Tweak the CMake build so that building a project just containing Clang
(and linking to an already-build LLVM) works with Xcode. The resulting
Xcode project for Clang is quite a bit smaller and builds/loads faster.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135216 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-14 23:42:32 +00:00
Chandler Carruth 169dd31c6c Revert "hack in my new variables for GCC"
Very sorry for the accidental commit of WIP code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132745 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-08 10:14:38 +00:00
Chandler Carruth 8afdd56bab hack in my new variables for GCC
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132743 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-08 10:13:14 +00:00
Oscar Fuentes f752d5bbae CMake: add support for CLANG_VENDOR. PR9966.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131733 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-20 15:57:59 +00:00
Oscar Fuentes c5cd252aba Handle gcc-compatible compilers (such as clang) the same way we handle
gcc.

Fixes PR9886.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131182 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-11 13:53:30 +00:00
Oscar Fuentes 5ec8a4df47 Reflect rename on LLVM cmake file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129246 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-10 16:17:31 +00:00
Oscar Fuentes fb767c8c37 CMake: removed some unnecesary conditionals from add_clang_library.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128483 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-29 20:51:00 +00:00
Oscar Fuentes 48e36464ee Removed workaround for unspecified build problem on MinGW.
Tested that MinGW/MSYS builds fine without that.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128341 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-26 16:11:33 +00:00
Oscar Fuentes 617508fb9e Fix some issues with include directories: remove a duplicate and put
Clang binary and source directories first (on that order).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127822 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-17 19:03:04 +00:00
NAKAMURA Takumi 0e836b117f CMake: [PR9321] Don't install include/clang/**/*.td.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126633 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-28 05:21:27 +00:00
Douglas Gregor 8435bf9375 CMake: add version information into the clang executable and libclang
shared library.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126502 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-25 19:24:02 +00:00
Douglas Gregor 670d6ed9f0 LLVM_INCLUDE_TESTS applies to unit tests, not the normal Clang tests
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126458 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-25 00:32:30 +00:00
Douglas Gregor fd681570a2 Don't include Clang's unit tests if LLVM's unit tests aren't being built
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126455 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-25 00:12:04 +00:00
NAKAMURA Takumi 30decb8488 CMake: Eliminate duplicate -D__STDC_LIMIT_MACROS and -D__STDC_CONSTANT_MACROS. llvm/cmake/modules/HandleLLVMOptions.cmake defines them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126105 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-21 03:19:49 +00:00
Oscar Fuentes a3f787c32b Put targets on folders, if the IDE supports the feature.
Requires CMake 2.8.3 or newer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126094 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-20 22:06:44 +00:00
Oscar Fuentes c8da1ecaf5 New function for tablegenning: clang_tablegen.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126093 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-20 22:06:32 +00:00
Daniel Dunbar 299696c8c9 More correct fix for CMake breakage I was seeing, my buildbots use
LLVM_INCLUDE_TESTS:=OFF, which may no longer be necessary for all I know.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125985 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-18 22:55:32 +00:00
NAKAMURA Takumi 792f975feb CMake: Tweak for Visual Studio 10 quirk at clang-standalone build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125647 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-16 03:07:15 +00:00
Jeffrey Yasskin 718b01d077 Add CMake support to the clang unittests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125561 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-15 07:54:28 +00:00
Oscar Fuentes b641f08cbe Add current binary and source directories to the header search list
for all compiler invocations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125514 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-14 20:14:11 +00:00