Commit Graph

20 Commits

Author SHA1 Message Date
Benjamin Kramer 4ab36ba726 Turns out that we may end up calling dladdr on GetExecutablePath, give it external linkage to make sure the lookup works on all platforms.
llvm-svn: 117813
2010-10-30 17:32:40 +00:00
Dan Gohman ba76802ed4 These functions don't need external linkage.
llvm-svn: 117733
2010-10-29 22:41:35 +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 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
Benjamin Kramer ead810e42b clang-interpreter: libFrontend depends on libSerialization. Fix linux build by changing the link order.
llvm-svn: 112187
2010-08-26 15:21:38 +00:00
Benjamin Kramer 1921fac97e Update clang-interpreter for recent DiagnosticClient ownership changes.
llvm-svn: 112181
2010-08-26 13:48:56 +00:00
Peter Collingbourne 8e65aeea5e Add Serialization dependency to clang-interpreter
llvm-svn: 111874
2010-08-24 00:31:31 +00:00
Peter Collingbourne 5a75e1ae07 Fix clang-interpreter build
llvm-svn: 109347
2010-07-24 17:59:51 +00:00
Daniel Dunbar c1b1729b66 Break Frontend's dependency on Rewrite, Checker and CodeGen in shared library configuration
Currently, all AST consumers are located in the Frontend library,
meaning that in a shared library configuration, Frontend has a
dependency on Rewrite, Checker and CodeGen.  This is suboptimal for
clients which only wish to make use of the frontend.  CodeGen in
particular introduces a large number of unwanted dependencies.

This patch breaks the dependency by moving all AST consumers with
dependencies on Rewrite, Checker and/or CodeGen to their respective
libraries.  The patch therefore introduces dependencies in the other
direction (i.e. from Rewrite, Checker and CodeGen to Frontend).

After applying this patch, Clang builds correctly using CMake and
shared libraries ("cmake -DBUILD_SHARED_LIBS=ON").

N.B. This patch includes file renames which are indicated in the
patch body.

Changes in this revision of the patch:
 - Fixed some copy-paste mistakes in the header files
 - Modified certain aspects of the coding to comply with the LLVM
   Coding Standards

llvm-svn: 106010
2010-06-15 17:48:49 +00:00
Daniel Dunbar d04e1a7ef1 Makefiles: Remove unnecessary early include of Makefile.config.
llvm-svn: 105640
2010-06-08 20:57:22 +00:00
Daniel Dunbar ee6b692551 Makefiles: Set Clang CPP compiler flags in a single location, instead of scattered throughout the project Makefiles.
llvm-svn: 105638
2010-06-08 20:44:43 +00:00
Daniel Dunbar e6c1daa8fd Makefile: Switch Clang Makefiles to always include the top-level Clang Makefile.
- This eliminates most dependencies on how Clang is installed relative to LLVM.

llvm-svn: 105637
2010-06-08 20:34:18 +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
Daniel Dunbar 6311731341 Update LINK_COMPONENTS for examples.
llvm-svn: 105607
2010-06-08 15:38:01 +00:00
Benjamin Kramer 6a2542b629 Tip of the day: save before commit.
llvm-svn: 101896
2010-04-20 11:55:38 +00:00
Benjamin Kramer 25d3d782d2 Fix -Wcast-qual warnings.
llvm-svn: 101895
2010-04-20 11:50:39 +00:00
Daniel Dunbar e43887bd2b Driver: Add support for a CLANGXX_IS_PRODUCTION build variable, which enable
Clang++ support, even in "Production" mode (for testing purposes).

llvm-svn: 100119
2010-04-01 18:21:41 +00:00
Kovarththanan Rajaratnam 9a3f55c2a4 Wire up Daniel's new spiffy C interpreter into the CMake build system
llvm-svn: 97311
2010-02-27 07:46:49 +00:00
Kovarththanan Rajaratnam 7cfffceec7 Add comment
llvm-svn: 97309
2010-02-27 07:06:44 +00:00
Daniel Dunbar 0076d94466 Add a minimal C interpreter example.
- Demonstrates how to build a standalone tool which loads source code using the
   Driver and Frontend libraries, and then uses CodeGen and the JIT to actually
   execute the code.

 - Still more complicated than it should be, but hey its only 153 lines. :)

--
ddunbar@ozzy:tmp$ cat hello.c
#include <stdio.h>
int main() { printf("hello world\n"); return 0; }
ddunbar@ozzy:tmp$ clang-interpreter hello.c
hello world
--

llvm-svn: 97133
2010-02-25 08:49:05 +00:00