Commit Graph

311 Commits

Author SHA1 Message Date
Chad Rosier edbb3ef902 Temporarily revert parts of r136702 to make cmake builds happy.
Someone with more cmake experience want to throw me a bone? :)

llvm-svn: 136709
2011-08-02 18:33:29 +00:00
Chad Rosier be10f9853c 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

llvm-svn: 136702
2011-08-02 17:58:04 +00:00
Douglas Gregor d7f2f9d07b 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.

llvm-svn: 135216
2011-07-14 23:42:32 +00:00
Chandler Carruth 2561f09c9b Revert "hack in my new variables for GCC"
Very sorry for the accidental commit of WIP code.

llvm-svn: 132745
2011-06-08 10:14:38 +00:00
Chandler Carruth 0169ec0988 hack in my new variables for GCC
llvm-svn: 132743
2011-06-08 10:13:14 +00:00
Oscar Fuentes aba6a3d094 CMake: add support for CLANG_VENDOR. PR9966.
llvm-svn: 131733
2011-05-20 15:57:59 +00:00
Oscar Fuentes cfc9efa43e Handle gcc-compatible compilers (such as clang) the same way we handle
gcc.

Fixes PR9886.

llvm-svn: 131182
2011-05-11 13:53:30 +00:00
Oscar Fuentes 643f1868de Reflect rename on LLVM cmake file.
llvm-svn: 129246
2011-04-10 16:17:31 +00:00
Oscar Fuentes fda6a4c33a CMake: removed some unnecesary conditionals from add_clang_library.
llvm-svn: 128483
2011-03-29 20:51:00 +00:00
Oscar Fuentes 4f444d7c44 Removed workaround for unspecified build problem on MinGW.
Tested that MinGW/MSYS builds fine without that.

llvm-svn: 128341
2011-03-26 16:11:33 +00:00
Oscar Fuentes 73963b67c1 Fix some issues with include directories: remove a duplicate and put
Clang binary and source directories first (on that order).

llvm-svn: 127822
2011-03-17 19:03:04 +00:00
NAKAMURA Takumi f7c666c38a CMake: [PR9321] Don't install include/clang/**/*.td.
llvm-svn: 126633
2011-02-28 05:21:27 +00:00
Douglas Gregor be8705bd3f CMake: add version information into the clang executable and libclang
shared library.

llvm-svn: 126502
2011-02-25 19:24:02 +00:00
Douglas Gregor 49709e75bb LLVM_INCLUDE_TESTS applies to unit tests, not the normal Clang tests
llvm-svn: 126458
2011-02-25 00:32:30 +00:00
Douglas Gregor 0e066c0238 Don't include Clang's unit tests if LLVM's unit tests aren't being built
llvm-svn: 126455
2011-02-25 00:12:04 +00:00
NAKAMURA Takumi 19c9fb6cbc CMake: Eliminate duplicate -D__STDC_LIMIT_MACROS and -D__STDC_CONSTANT_MACROS. llvm/cmake/modules/HandleLLVMOptions.cmake defines them.
llvm-svn: 126105
2011-02-21 03:19:49 +00:00
Oscar Fuentes 15fe190027 Put targets on folders, if the IDE supports the feature.
Requires CMake 2.8.3 or newer.

llvm-svn: 126094
2011-02-20 22:06:44 +00:00
Oscar Fuentes 6f72540e46 New function for tablegenning: clang_tablegen.
llvm-svn: 126093
2011-02-20 22:06:32 +00:00
Daniel Dunbar 5423b497ab 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.

llvm-svn: 125985
2011-02-18 22:55:32 +00:00
NAKAMURA Takumi 2ec773f772 CMake: Tweak for Visual Studio 10 quirk at clang-standalone build.
llvm-svn: 125647
2011-02-16 03:07:15 +00:00
Jeffrey Yasskin cd3858b103 Add CMake support to the clang unittests.
llvm-svn: 125561
2011-02-15 07:54:28 +00:00
Oscar Fuentes c9987fbbfe Add current binary and source directories to the header search list
for all compiler invocations.

llvm-svn: 125514
2011-02-14 20:14:11 +00:00
Ted Kremenek 4bd19da586 Add hack to CMakeLists.txt so that StaticAnalyzer libraries find their corresponding headers.
This is a hack because we really should only search in the 'include/clang/StaticAnalyzer' directory
if we are in 'lib/StaticAnalyzer'.  My CMake knowledge is limited, so I appeal to anyone with
more expertise.

llvm-svn: 125252
2011-02-10 01:03:09 +00:00
Oscar Fuentes edeaf16f2c Moved here from LLVM Clang's configuration options and related macros.
llvm-svn: 124825
2011-02-03 22:48:20 +00:00
Oscar Fuentes ce8661608b Optionally, Clang now builds using LLVM as an external library.
The user sets the variable CLANG_PATH_TO_LLVM_BUILD pointing to a LLVM
build directory or to a directory where LLVM was installed. When using
a non-installed LLVM build, it is necessary to set
CLANG_PATH_TO_LLVM_SOURCE as well.

llvm-svn: 124817
2011-02-03 20:57:53 +00:00
Oscar Fuentes 67cce9b135 Use some of the llvm cmake infraestructure. This takes care of
disabling rtti and exceptions where requested. Remove some unnecessary
code too.

llvm-svn: 122750
2011-01-03 17:00:02 +00:00
Michael J. Spencer 716d01a612 CMake: Add runtime dir.
llvm-svn: 121957
2010-12-16 03:28:42 +00:00
Oscar Fuentes b3ce035c71 Copied some flags from the Makefile build to the list of GCC flags.
This removes a lot of warnings.

llvm-svn: 116545
2010-10-15 00:16:22 +00:00
Michael J. Spencer 09476212de Revert "CMake: Update to use standard CMake dependency tracking facilities instead"
This reverts commit r113631

Conflicts:

	CMakeLists.txt
	lib/CodeGen/CMakeLists.txt

llvm-svn: 113817
2010-09-13 23:54:41 +00:00
Michael J. Spencer 9efc54890d CMake: Fix mingw32 build.
llvm-svn: 113677
2010-09-11 02:13:48 +00:00
Michael J. Spencer 0881f4a367 CMake: Update to use standard CMake dependency tracking facilities instead
of whatever we were using before...

llvm-svn: 113631
2010-09-10 21:13:16 +00:00
Daniel Dunbar d7e887fb7f clang: Derive version name from LLVM unless specified explicitly. This means
clang is now clang 2.8.

llvm-svn: 106914
2010-06-25 23:34:47 +00:00
Daniel Dunbar c3275c5440 build: Add a generated Version.inc file instead of duplicating information.
llvm-svn: 106863
2010-06-25 17:33:46 +00:00
Douglas Gregor 61b5ff5ab4 Teach the PrintFunctionNames example to be a proper module, so that
Clang can load it as a plugin. Original fix by Troy D. Straszheim,
which I extended with Darwin support. Fixes PR6801.

llvm-svn: 105630
2010-06-08 19:23:49 +00:00
Chris Lattner 7d9e03ad5b exclude cmake build directories from being installed
with "make install".  Patch by Michael Forney!

llvm-svn: 102299
2010-04-25 04:59:35 +00:00
Chandler Carruth 13bca6cd5a Prevent accidental in-source builds with CMake, and detect when there are
generated files from a previous in-source builds.

llvm-svn: 101665
2010-04-17 20:12:02 +00:00
Kovarththanan Rajaratnam 8841e86d11 Include *.inc in install target
Fixes PR6755.

llvm-svn: 100105
2010-04-01 14:24:41 +00:00
Daniel Dunbar 2c88b01bb6 Add optional CMake build for Clang examples, patch by Kovarththanan Rajaratnam.
llvm-svn: 89078
2009-11-17 09:32:51 +00:00
Oscar Fuentes e814afd7b0 Rather than excluding quite some things, and still installing
CMakeLists.txt, Makefiles, ... it's better to whitelist what we really
want to install.

Patch by Ingmar Vanhassel!

llvm-svn: 85283
2009-10-27 19:59:34 +00:00
Oscar Fuentes e6fc25321f CMake: Append LLVM_LIBDIR_SUFFIX to library destination.
Based on a patch by Ingmar Vanhassel.

llvm-svn: 85276
2009-10-27 19:42:21 +00:00
Benjamin Kramer 3ce29858e9 CMake mingw build fixes.
- llvm's libs must be linked after clang's
- libLLVMSystem depends on psapi on win32 (get_system_libs has it)
- CIndex builds successfully on mingw now

llvm-svn: 83773
2009-10-11 12:22:00 +00:00
Douglas Gregor 43bc1a7483 CMake build support for libCIndex and c-index-test. The indexing tests
are now running properly from within CMake.

llvm-svn: 82755
2009-09-25 06:35:15 +00:00
Douglas Gregor bd1af01fcd Make the GCC warning flags passed by CMake the same as the warning flags passed in the make build
llvm-svn: 82221
2009-09-18 14:47:57 +00:00
Daniel Dunbar f8d26ad3a3 Add CLANG_{SOURCE,BINARY}_DIR cmake variables.
llvm-svn: 82098
2009-09-17 00:07:10 +00:00
Douglas Gregor 24f01f1251 The CMake build system now derives the Clang version number from VER.
llvm-svn: 82085
2009-09-16 21:59:05 +00:00
Mike Stump b4bed3a497 Collapse more clang version numbers down into fewer places.
llvm-svn: 81983
2009-09-16 01:26:05 +00:00
Douglas Gregor e26d4e49df Update Clang version for CMake
llvm-svn: 81938
2009-09-15 22:30:13 +00:00
Douglas Gregor 33870d908f CMake: Improve installation of Clang
- Install clang-cc into libexec
  - Install headers into lib/clang/<version>/include
  - Don't install other clang-based tools (clang-wpa, clang-index, etc.)

llvm-svn: 79827
2009-08-23 05:28:29 +00:00
Douglas Gregor 4bf38785b1 Make sure that .td and .def files get into the list of headers in a CMake build, for use in Xcode and Visual Studio
llvm-svn: 73623
2009-06-17 18:31:02 +00:00
Oscar Fuentes 6c0c09dcbb CMake: New variable LLVM_LIBDIR_SUFFIX.
Patch by Ingmar Vanhassel!

llvm-svn: 73217
2009-06-12 02:54:12 +00:00
Douglas Gregor 0770532f5a First cut at regression testing Clang with CMake
llvm-svn: 72945
2009-06-05 16:00:31 +00:00
Ted Kremenek a87b8a9a72 CMake: Also include header files in target when the generator is 'XCode'.
llvm-svn: 67703
2009-03-25 20:34:07 +00:00
Daniel Dunbar e5a7ecc23a Move <root>/Driver into <root>/tools/clang-cc.
Again, I tried to update cmake but it is untested.

llvm-svn: 67605
2009-03-24 03:00:12 +00:00
Daniel Dunbar 3db73ab7f6 Add CMake files for tools/driver; I am just guessing here, can someone test/fix?
llvm-svn: 67604
2009-03-24 02:52:57 +00:00
Douglas Gregor 23d75bb326 Build system changes to use TableGen to generate the various
diagnostics. This builds on the patch that Sebastian committed and
then revert. Major differences are:

  - We don't remove or use the current ".def" files. Instead, for now,
    we just make sure that we're building the ".inc" files.
  - Fixed CMake makefiles to run TableGen and build the ".inc" files
    when needed. Tested with both the Xcode and Makefile generators
    provided by CMake, so it should be solid.
  - Fixed normal makefiles to handle out-of-source builds that involve
    the ".inc" files.

I'll send a separate patch to the list with Sebastian's changes that
eliminate the use of the .def files.

llvm-svn: 67058
2009-03-16 23:06:59 +00:00
Sebastian Redl 4ae9b126fe Revert the switch to the tablegen diags. It fails for seperate objdir builds and cmake builds, and I have no clue what to do about it. Revisit this after someone with a clue about the build systems has looked at it.
llvm-svn: 67009
2009-03-14 15:58:54 +00:00
Sebastian Redl 51e037e3c4 Switch diagnostics from .def to tablegen files. Please validate the Windows build.
llvm-svn: 67007
2009-03-14 12:00:12 +00:00
Cedric Venet c41deefec7 Add /Za to all MSVC build of a clang libraries.
This allow to use the new move emulation for smart pointer by disabling language extension.

llvm-svn: 60979
2008-12-13 11:00:04 +00:00
Chris Lattner c3b41e31fb "a patch telling cmake to install clang headers in the target
install directory"

Patch by Lukasz Janyst!

llvm-svn: 59059
2008-11-11 18:39:10 +00:00
Cedric Venet 1bb549685b Add header files to CMake build solution. It use globing so it doesn't need to be manually maintained, but it won't automatically detect a new header. I think this is a good compromise for the header files, since there presence in the solution is just an help for the user. Moreover, a new header is often introduced with a new cpp source file which need a makefile change, which will regenerate the solution and detect the new header.
llvm-svn: 58566
2008-11-02 16:28:53 +00:00
Oscar Fuentes 07d9f9a6ec CMake: Builds and installs clang binary and libs (no docs yet). It
must be under the `tools' subdirectory of the LLVM *source* tree.

llvm-svn: 58180
2008-10-26 00:56:18 +00:00