2017-08-25 16:44:56 +08:00
|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
2009-02-15 04:20:19 +08:00
|
|
|
"http://www.w3.org/TR/html4/strict.dtd">
|
|
|
|
<!-- Material used from: HTML 4.01 specs: http://www.w3.org/TR/html401/ -->
|
|
|
|
<html>
|
|
|
|
<head>
|
2009-02-25 23:22:45 +08:00
|
|
|
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
2018-03-02 06:01:06 +08:00
|
|
|
<title>Clang C Language Family Frontend for LLVM</title>
|
2009-02-25 23:22:45 +08:00
|
|
|
<link type="text/css" rel="stylesheet" href="menu.css">
|
|
|
|
<link type="text/css" rel="stylesheet" href="content.css">
|
2009-02-15 04:20:19 +08:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<!--#include virtual="menu.html.incl"-->
|
|
|
|
<div id="content">
|
|
|
|
<!--*********************************************************************-->
|
2018-03-02 06:01:06 +08:00
|
|
|
<h1>Clang: a C language family frontend for LLVM</h1>
|
2009-02-15 04:20:19 +08:00
|
|
|
<!--*********************************************************************-->
|
2017-08-25 16:44:56 +08:00
|
|
|
|
2018-03-02 06:01:06 +08:00
|
|
|
<p>The Clang project provides a language front-end and tooling infrastructure
|
|
|
|
for languages in the C language family (C, C++, Objective C/C++, OpenCL,
|
|
|
|
CUDA, and RenderScript) for the <a href="http://www.llvm.org/">LLVM</a>
|
|
|
|
project. Both a GCC-compatible compiler driver (<tt>clang</tt>) and an
|
|
|
|
MSVC-compatible compiler driver (<tt>clang-cl.exe</tt>) are provided. You
|
|
|
|
can <a href="get_started.html">get and build</a> the source today.</p>
|
2017-08-25 16:44:56 +08:00
|
|
|
|
2009-02-15 04:20:19 +08:00
|
|
|
<!--=====================================================================-->
|
|
|
|
<h2 id="goals">Features and Goals</h2>
|
|
|
|
<!--=====================================================================-->
|
2017-08-25 16:44:56 +08:00
|
|
|
|
2009-02-15 04:20:19 +08:00
|
|
|
<p>Some of the goals for the project include the following:</p>
|
2017-08-25 16:44:56 +08:00
|
|
|
|
2009-02-15 04:20:19 +08:00
|
|
|
<p><b><a href="features.html#enduser">End-User Features</a></b>:</p>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
<li>Fast compiles and low memory use</li>
|
2009-03-20 02:58:22 +08:00
|
|
|
<li>Expressive diagnostics (<a href="diagnostics.html">examples</a>)</li>
|
2009-02-15 04:20:19 +08:00
|
|
|
<li>GCC compatibility</li>
|
|
|
|
</ul>
|
|
|
|
|
2017-08-25 16:44:56 +08:00
|
|
|
<p><b><a href="features.html#applications">Utility and
|
2009-02-15 04:20:19 +08:00
|
|
|
Applications</a></b>:</p>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
<li>Modular library based architecture</li>
|
|
|
|
<li>Support diverse clients (refactoring, static analysis, code generation,
|
2014-01-17 01:04:52 +08:00
|
|
|
etc.)</li>
|
2009-02-15 04:20:19 +08:00
|
|
|
<li>Allow tight integration with IDEs</li>
|
|
|
|
<li>Use the LLVM 'BSD' License</li>
|
|
|
|
</ul>
|
|
|
|
|
2017-08-25 16:44:56 +08:00
|
|
|
<p><b><a href="features.html#design">Internal Design and
|
2009-02-15 04:20:19 +08:00
|
|
|
Implementation</a></b>:</p>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
<li>A real-world, production quality compiler</li>
|
|
|
|
<li>A simple and hackable code base</li>
|
|
|
|
<li>A single unified parser for C, Objective C, C++, and Objective C++</li>
|
|
|
|
<li>Conformance with C/C++/ObjC and their variants</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<p>Of course this is only a rough outline of the goals and features of
|
2017-08-25 16:44:56 +08:00
|
|
|
Clang. To get a true sense of what it is all about, see the <a
|
2009-02-15 04:20:19 +08:00
|
|
|
href="features.html">Features</a> section, which breaks
|
|
|
|
each of these down and explains them in more detail.</p>
|
|
|
|
|
2017-08-25 16:44:56 +08:00
|
|
|
|
2009-02-15 04:20:19 +08:00
|
|
|
<!--=====================================================================-->
|
|
|
|
<h2>Why?</h2>
|
|
|
|
<!--=====================================================================-->
|
2017-08-25 16:44:56 +08:00
|
|
|
|
2014-01-17 01:04:52 +08:00
|
|
|
<p>Development of the new front-end was started out of a need
|
2009-02-15 04:20:19 +08:00
|
|
|
for a compiler that allows better diagnostics, better integration with
|
|
|
|
IDEs, a license that is compatible with commercial products, and a
|
|
|
|
nimble compiler that is easy to develop and maintain. All of these were
|
|
|
|
motivations for starting work on a new front-end that could
|
|
|
|
meet these needs.</p>
|
2017-08-25 16:44:56 +08:00
|
|
|
|
2009-02-15 04:20:19 +08:00
|
|
|
<p>For a more detailed comparison between Clang and other compilers, please
|
2018-03-02 06:01:06 +08:00
|
|
|
see the <a href="comparison.html">Clang comparison page</a>.</p>
|
2017-08-25 16:44:56 +08:00
|
|
|
|
2009-02-15 04:20:19 +08:00
|
|
|
<!--=====================================================================-->
|
|
|
|
<h2>Current Status</h2>
|
|
|
|
<!--=====================================================================-->
|
2017-08-25 16:44:56 +08:00
|
|
|
|
2014-01-17 01:04:52 +08:00
|
|
|
<p>Clang is considered to
|
2017-08-25 16:44:56 +08:00
|
|
|
be a production quality C, Objective-C, C++ and Objective-C++ compiler when
|
|
|
|
targeting X86-32, X86-64, and ARM (other targets may have caveats, but are
|
2018-09-14 17:08:21 +08:00
|
|
|
usually easy to fix). As example, Clang is used in production to build
|
|
|
|
performance-critical software like Chrome or Firefox.<br /> If you are looking
|
|
|
|
for source analysis or source-to-source transformation tools, Clang is probably
|
|
|
|
a great solution for you. Clang supports C++11, C++14 and C++17, please see
|
|
|
|
the <a href="cxx_status.html">C++ status</a> page for more information.</p>
|
2009-02-15 04:20:19 +08:00
|
|
|
|
|
|
|
<!--=====================================================================-->
|
|
|
|
<h2>Get it and get involved!</h2>
|
|
|
|
<!--=====================================================================-->
|
2017-08-25 16:44:56 +08:00
|
|
|
|
2009-02-15 04:20:19 +08:00
|
|
|
<p>Start by <a href="get_started.html">getting the code, building it, and
|
|
|
|
playing with it</a>. This will show you the sorts of things we can do
|
2016-02-11 05:06:10 +08:00
|
|
|
today and will let you have the "Clang experience" first hand: hopefully
|
2009-02-15 04:20:19 +08:00
|
|
|
it will "resonate" with you. :)</p>
|
2017-08-25 16:44:56 +08:00
|
|
|
|
2009-02-15 04:20:19 +08:00
|
|
|
<p>Once you've done that, please consider <a href="get_involved.html">getting
|
2018-03-02 06:01:06 +08:00
|
|
|
involved in the Clang community</a>. The Clang developers include numerous
|
2017-08-25 16:44:56 +08:00
|
|
|
volunteer contributors with a variety of backgrounds. If you're
|
2009-02-15 04:20:19 +08:00
|
|
|
interested in
|
2016-02-11 05:06:10 +08:00
|
|
|
following the development of Clang, signing up for a mailing list is a good
|
2009-02-15 04:20:19 +08:00
|
|
|
way to learn about how the project works.</p>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|