Daniel Dunbar | b114d2e | 2009-10-17 21:50:11 +0000 | [diff] [blame^] | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" |
| 2 | "http://www.w3.org/TR/html4/strict.dtd"> |
| 3 | <html> |
| 4 | <head> |
| 5 | <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> |
| 6 | <title>Clang - Universal Driver</title> |
| 7 | <link type="text/css" rel="stylesheet" href="menu.css" /> |
| 8 | <link type="text/css" rel="stylesheet" href="content.css" /> |
| 9 | </head> |
| 10 | <body> |
| 11 | |
| 12 | <!--#include virtual="menu.html.incl"--> |
| 13 | |
| 14 | <div id="content"> |
| 15 | |
| 16 | <h1>The Clang Universal Driver Project</h1> |
| 17 | |
| 18 | <p>Clang is inherently a cross compiler, in that it is always capable of |
| 19 | building code for targets which are a different architecture or even operating |
| 20 | system from the one running the compiler. However, actually cross compiling in |
| 21 | practice involves much more than just generating the right assembly code for a |
| 22 | target, it also requires having an appropriate tool chain (assemblers, linkers), |
| 23 | access to header files and libraries for the target, and many other details (for |
| 24 | example, the calling convention or whether software floating point is in |
| 25 | use). Traditionally, compilers and development environments provide little |
| 26 | assistance with this process, so users do not have easy access to the powerful |
| 27 | underlying cross-compilation abilities of clang.</p> |
| 28 | |
| 29 | <p>We would like to solve this problem by defining a new model for how cross |
| 30 | compilation is done, based on the idea of a <i>universal driver</i>. The key |
| 31 | point of this model is that the user would always access the compiler through a |
| 32 | single entry point (e.g., <tt>/usr/bin/cc</tt>) and provide an argument |
| 33 | specifying the <i>configuration</i> they would like to target. Under the hood |
| 34 | this entry point (the universal driver) would have access to all the information |
| 35 | that the driver, compiler, and other tools need to build applications for that |
| 36 | target.</p> |
| 37 | |
| 38 | <p>This is a large and open-ended project. It's eventually success depends not |
| 39 | just on implementing the model, but also on getting buy-in from compiler |
| 40 | developers, operating system distribution vendors and the development community |
| 41 | at large. Our plan is to begin by defining a clear list of the problems we want |
| 42 | to solve and a proposed implementation (from the user perspective).</p> |
| 43 | |
| 44 | <p>This project is in the very early (i.e., thought experiment) stages of |
| 45 | development. Stay tuned for more information, and of course, patches |
| 46 | welcome!</p> |
| 47 | |
| 48 | <p>See also <a href="http://llvm.org/PR4127">PR4127</a>.</p> |
| 49 | |
| 50 | </div> |
| 51 | </body> |
| 52 | </html> |