Sylvestre Ledru | 29e2a58 | 2017-08-25 08:44:56 +0000 | [diff] [blame] | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" |
Cedric Venet | 08438133 | 2009-02-14 20:20:19 +0000 | [diff] [blame] | 2 | "http://www.w3.org/TR/html4/strict.dtd"> |
| 3 | <!-- Material used from: HTML 4.01 specs: http://www.w3.org/TR/html401/ --> |
| 4 | <html> |
| 5 | <head> |
Gabor Greif | dd4ddf1 | 2009-02-25 15:22:45 +0000 | [diff] [blame] | 6 | <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
Richard Smith | d9d42f9 | 2018-03-01 22:01:06 +0000 | [diff] [blame] | 7 | <title>Clang C Language Family Frontend for LLVM</title> |
Gabor Greif | dd4ddf1 | 2009-02-25 15:22:45 +0000 | [diff] [blame] | 8 | <link type="text/css" rel="stylesheet" href="menu.css"> |
| 9 | <link type="text/css" rel="stylesheet" href="content.css"> |
Cedric Venet | 08438133 | 2009-02-14 20:20:19 +0000 | [diff] [blame] | 10 | </head> |
| 11 | <body> |
| 12 | <!--#include virtual="menu.html.incl"--> |
| 13 | <div id="content"> |
| 14 | <!--*********************************************************************--> |
Richard Smith | d9d42f9 | 2018-03-01 22:01:06 +0000 | [diff] [blame] | 15 | <h1>Clang: a C language family frontend for LLVM</h1> |
Cedric Venet | 08438133 | 2009-02-14 20:20:19 +0000 | [diff] [blame] | 16 | <!--*********************************************************************--> |
Sylvestre Ledru | 29e2a58 | 2017-08-25 08:44:56 +0000 | [diff] [blame] | 17 | |
Richard Smith | d9d42f9 | 2018-03-01 22:01:06 +0000 | [diff] [blame] | 18 | <p>The Clang project provides a language front-end and tooling infrastructure |
| 19 | for languages in the C language family (C, C++, Objective C/C++, OpenCL, |
| 20 | CUDA, and RenderScript) for the <a href="http://www.llvm.org/">LLVM</a> |
| 21 | project. Both a GCC-compatible compiler driver (<tt>clang</tt>) and an |
| 22 | MSVC-compatible compiler driver (<tt>clang-cl.exe</tt>) are provided. You |
| 23 | can <a href="get_started.html">get and build</a> the source today.</p> |
Sylvestre Ledru | 29e2a58 | 2017-08-25 08:44:56 +0000 | [diff] [blame] | 24 | |
Cedric Venet | 08438133 | 2009-02-14 20:20:19 +0000 | [diff] [blame] | 25 | <!--=====================================================================--> |
| 26 | <h2 id="goals">Features and Goals</h2> |
| 27 | <!--=====================================================================--> |
Sylvestre Ledru | 29e2a58 | 2017-08-25 08:44:56 +0000 | [diff] [blame] | 28 | |
Cedric Venet | 08438133 | 2009-02-14 20:20:19 +0000 | [diff] [blame] | 29 | <p>Some of the goals for the project include the following:</p> |
Sylvestre Ledru | 29e2a58 | 2017-08-25 08:44:56 +0000 | [diff] [blame] | 30 | |
Cedric Venet | 08438133 | 2009-02-14 20:20:19 +0000 | [diff] [blame] | 31 | <p><b><a href="features.html#enduser">End-User Features</a></b>:</p> |
| 32 | |
| 33 | <ul> |
| 34 | <li>Fast compiles and low memory use</li> |
Chris Lattner | 8fda674 | 2009-03-19 18:58:22 +0000 | [diff] [blame] | 35 | <li>Expressive diagnostics (<a href="diagnostics.html">examples</a>)</li> |
Cedric Venet | 08438133 | 2009-02-14 20:20:19 +0000 | [diff] [blame] | 36 | <li>GCC compatibility</li> |
| 37 | </ul> |
| 38 | |
Sylvestre Ledru | 29e2a58 | 2017-08-25 08:44:56 +0000 | [diff] [blame] | 39 | <p><b><a href="features.html#applications">Utility and |
Cedric Venet | 08438133 | 2009-02-14 20:20:19 +0000 | [diff] [blame] | 40 | Applications</a></b>:</p> |
| 41 | |
| 42 | <ul> |
| 43 | <li>Modular library based architecture</li> |
| 44 | <li>Support diverse clients (refactoring, static analysis, code generation, |
Alp Toker | 344845b | 2014-01-16 17:04:52 +0000 | [diff] [blame] | 45 | etc.)</li> |
Cedric Venet | 08438133 | 2009-02-14 20:20:19 +0000 | [diff] [blame] | 46 | <li>Allow tight integration with IDEs</li> |
| 47 | <li>Use the LLVM 'BSD' License</li> |
| 48 | </ul> |
| 49 | |
Sylvestre Ledru | 29e2a58 | 2017-08-25 08:44:56 +0000 | [diff] [blame] | 50 | <p><b><a href="features.html#design">Internal Design and |
Cedric Venet | 08438133 | 2009-02-14 20:20:19 +0000 | [diff] [blame] | 51 | Implementation</a></b>:</p> |
| 52 | |
| 53 | <ul> |
| 54 | <li>A real-world, production quality compiler</li> |
| 55 | <li>A simple and hackable code base</li> |
| 56 | <li>A single unified parser for C, Objective C, C++, and Objective C++</li> |
| 57 | <li>Conformance with C/C++/ObjC and their variants</li> |
| 58 | </ul> |
| 59 | |
| 60 | <p>Of course this is only a rough outline of the goals and features of |
Sylvestre Ledru | 29e2a58 | 2017-08-25 08:44:56 +0000 | [diff] [blame] | 61 | Clang. To get a true sense of what it is all about, see the <a |
Cedric Venet | 08438133 | 2009-02-14 20:20:19 +0000 | [diff] [blame] | 62 | href="features.html">Features</a> section, which breaks |
| 63 | each of these down and explains them in more detail.</p> |
| 64 | |
Sylvestre Ledru | 29e2a58 | 2017-08-25 08:44:56 +0000 | [diff] [blame] | 65 | |
Cedric Venet | 08438133 | 2009-02-14 20:20:19 +0000 | [diff] [blame] | 66 | <!--=====================================================================--> |
| 67 | <h2>Why?</h2> |
| 68 | <!--=====================================================================--> |
Sylvestre Ledru | 29e2a58 | 2017-08-25 08:44:56 +0000 | [diff] [blame] | 69 | |
Alp Toker | 344845b | 2014-01-16 17:04:52 +0000 | [diff] [blame] | 70 | <p>Development of the new front-end was started out of a need |
Cedric Venet | 08438133 | 2009-02-14 20:20:19 +0000 | [diff] [blame] | 71 | for a compiler that allows better diagnostics, better integration with |
| 72 | IDEs, a license that is compatible with commercial products, and a |
| 73 | nimble compiler that is easy to develop and maintain. All of these were |
| 74 | motivations for starting work on a new front-end that could |
| 75 | meet these needs.</p> |
Sylvestre Ledru | 29e2a58 | 2017-08-25 08:44:56 +0000 | [diff] [blame] | 76 | |
Cedric Venet | 08438133 | 2009-02-14 20:20:19 +0000 | [diff] [blame] | 77 | <p>For a more detailed comparison between Clang and other compilers, please |
Richard Smith | d9d42f9 | 2018-03-01 22:01:06 +0000 | [diff] [blame] | 78 | see the <a href="comparison.html">Clang comparison page</a>.</p> |
Sylvestre Ledru | 29e2a58 | 2017-08-25 08:44:56 +0000 | [diff] [blame] | 79 | |
Cedric Venet | 08438133 | 2009-02-14 20:20:19 +0000 | [diff] [blame] | 80 | <!--=====================================================================--> |
| 81 | <h2>Current Status</h2> |
| 82 | <!--=====================================================================--> |
Sylvestre Ledru | 29e2a58 | 2017-08-25 08:44:56 +0000 | [diff] [blame] | 83 | |
Alp Toker | 344845b | 2014-01-16 17:04:52 +0000 | [diff] [blame] | 84 | <p>Clang is considered to |
Sylvestre Ledru | 29e2a58 | 2017-08-25 08:44:56 +0000 | [diff] [blame] | 85 | be a production quality C, Objective-C, C++ and Objective-C++ compiler when |
| 86 | targeting X86-32, X86-64, and ARM (other targets may have caveats, but are |
Sylvestre Ledru | 5c3457d | 2018-09-14 09:08:21 +0000 | [diff] [blame] | 87 | usually easy to fix). As example, Clang is used in production to build |
| 88 | performance-critical software like Chrome or Firefox.<br /> If you are looking |
| 89 | for source analysis or source-to-source transformation tools, Clang is probably |
| 90 | a great solution for you. Clang supports C++11, C++14 and C++17, please see |
| 91 | the <a href="cxx_status.html">C++ status</a> page for more information.</p> |
Cedric Venet | 08438133 | 2009-02-14 20:20:19 +0000 | [diff] [blame] | 92 | |
Cedric Venet | 08438133 | 2009-02-14 20:20:19 +0000 | [diff] [blame] | 93 | <!--=====================================================================--> |
| 94 | <h2>Get it and get involved!</h2> |
| 95 | <!--=====================================================================--> |
Sylvestre Ledru | 29e2a58 | 2017-08-25 08:44:56 +0000 | [diff] [blame] | 96 | |
Cedric Venet | 08438133 | 2009-02-14 20:20:19 +0000 | [diff] [blame] | 97 | <p>Start by <a href="get_started.html">getting the code, building it, and |
| 98 | playing with it</a>. This will show you the sorts of things we can do |
Mandeep Singh Grang | a2623c8 | 2016-02-10 21:06:10 +0000 | [diff] [blame] | 99 | today and will let you have the "Clang experience" first hand: hopefully |
Cedric Venet | 08438133 | 2009-02-14 20:20:19 +0000 | [diff] [blame] | 100 | it will "resonate" with you. :)</p> |
Sylvestre Ledru | 29e2a58 | 2017-08-25 08:44:56 +0000 | [diff] [blame] | 101 | |
Cedric Venet | 08438133 | 2009-02-14 20:20:19 +0000 | [diff] [blame] | 102 | <p>Once you've done that, please consider <a href="get_involved.html">getting |
Richard Smith | d9d42f9 | 2018-03-01 22:01:06 +0000 | [diff] [blame] | 103 | involved in the Clang community</a>. The Clang developers include numerous |
Sylvestre Ledru | 29e2a58 | 2017-08-25 08:44:56 +0000 | [diff] [blame] | 104 | volunteer contributors with a variety of backgrounds. If you're |
Cedric Venet | 08438133 | 2009-02-14 20:20:19 +0000 | [diff] [blame] | 105 | interested in |
Mandeep Singh Grang | a2623c8 | 2016-02-10 21:06:10 +0000 | [diff] [blame] | 106 | following the development of Clang, signing up for a mailing list is a good |
Cedric Venet | 08438133 | 2009-02-14 20:20:19 +0000 | [diff] [blame] | 107 | way to learn about how the project works.</p> |
| 108 | </div> |
| 109 | </body> |
| 110 | </html> |