Lines Matching +full:clang +full:- +full:tools
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
3 <!-- Material used from: HTML 4.01 specs: http://www.w3.org/TR/html401/ -->
6 <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
7 <title>Hacking on clang</title>
11 pre { margin-left: 1.5em; }
15 <!--#include virtual="menu.html.incl"-->
17 <!--*********************************************************************-->
18 <h1>Hacking on Clang</h1>
19 <!--*********************************************************************-->
22 on Clang for developers who are new to the Clang and/or LLVM
30 <li><a href="#testingNonWindows">Testing on Unix-like Systems</a></li>
39 <!--=====================================================================-->
41 <!--=====================================================================-->
43 <p>Clang follows the
46 and to match the style of the code to that present in Clang (for example, in
49 <p>Clang has a few additional coding standards:</p>
54 upon clients and block integrating Clang as a library. Libraries should
60 <!--=====================================================================-->
62 <!--=====================================================================-->
64 <p>Both Clang and LLVM use doxygen to provide API documentation. Their
67 <li><a href="http://clang.llvm.org/doxygen">Clang</a></li>
75 <!--=====================================================================-->
77 <!--=====================================================================-->
81 <li>Many LLVM and Clang data structures provide
91 data formatters for clang data structures in
92 <a href="http://llvm.org/svn/llvm-project/cfe/trunk/utils/ClangDataFormat.py">
96 <!--=====================================================================-->
98 <!--=====================================================================-->
101 <a href="http://llvm.org/svn/llvm-project/llvm/trunk/utils/LLVMVisualizers/llvm.natvis">
103 <a href="http://llvm.org/svn/llvm-project/cfe/trunk/utils/ClangVisualizers/clang.natvis">
104 <tt>utils/ClangVisualizers/clang.natvis</tt></a> provide debugger visualizers
112 <!--=====================================================================-->
114 <!--=====================================================================-->
116 <!--=====================================================================-->
117 <h3 id="testingNonWindows">Testing on Unix-like Systems</h3>
118 <!--=====================================================================-->
120 <p>Clang includes a basic regression suite in the tree which can be
121 run with <tt>make test</tt> from the top-level clang directory, or
122 just <tt>make</tt> in the <em>test</em> sub-directory.
126 <p>If you built LLVM and Clang using CMake, the test suite can be run
127 with <tt>make clang-test</tt> from the top-level LLVM directory.</p>
132 beginning indicating the Clang compile options to use, to be read
141 <pre>--- Running clang tests for i686-pc-linux-gnu ---</pre>
154 /home/john/llvm/tools/clang/test/SemaCXX/member-name-lookup.cpp
155 /home/john/llvm/tools/clang/test/SemaCXX/namespace-alias.cpp
156 /home/john/llvm/tools/clang/test/SemaCXX/using-directive.cpp
164 <tt>make test VG=1</tt> in the top-level clang directory.</p>
168 Test Suite</a> with clang is recommended. Currently the best way to
169 override LLVMGCC, as in: <tt>make LLVMGCC="clang -std=gnu89"
170 TEST=nightly report</tt> (make sure <tt>clang</tt> is in your PATH or use the
173 <!--=====================================================================-->
175 <!--=====================================================================-->
177 <p>The Clang test suite can be run from either Visual Studio or
185 <p>The GnuWin32 tools are also necessary for running the tests.
194 for running the tests, "clang-test" being the root. Therefore, to
195 run the test from Visual Studio, right-click the clang-test project
205 <!--=====================================================================-->
207 <!--=====================================================================-->
210 be convenient to run the test harness on the command-line directly. Before
221 python (path to llvm)\llvm\utils\lit\lit.py -sv
222 --param=build_mode=Win32 --param=build_config=Debug
223 --param=clang_site_config=(build dir)\tools\clang\test\lit.site.cfg
224 (path to llvm)\llvm\tools\clang\test
229 <tt>--param=build_config=(build config)</tt>. You may also need to specify
230 the build mode (Win32, etc) via <tt>--param=build_mode=(build mode)</tt>.</p>
233 lives in (build dir)\tools\clang\test, via
234 <tt>--param=clang_site_config=(build dir)\tools\clang\test\lit.site.cfg</tt>.
240 python (path to llvm)\llvm\utils\lit\lit.py -sv
241 --param=build_mode=Win32 --param=build_config=Debug
242 --param=clang_site_config=(build dir)\tools\clang\test\lit.site.cfg
243 (path to llvm)\llvm\tools\clang\test\(dir)\(test)
249 python C:\Tool\llvm\utils\lit\lit.py -sv
250 --param=build_mode=Win32 --param=build_config=Debug
251 --param=clang_site_config=c:\Tools\build\tools\clang\test\lit.site.cfg
252 C:\Tools\llvm\tools\clang\test\Sema\wchar.c
255 <p>The -sv option above tells the runner to show the test output if
258 <p>You can also pass in the --no-progress-bar option if you wish to disable
263 <pre>lit.py: lit.cfg:152: note: using clang: 'C:\Tools\llvm\bin\Release\clang.EXE'
264 -- Testing: Testing: 2534 tests, 4 threads --
274 <!--=====================================================================-->
276 <!--=====================================================================-->
278 <p>To return changes to the Clang team, unless you have checkin
280 cfe-commits mailing list, with an explanation of what the patch is
281 for. clang follows <a
284 architectural change), you can use the cfe-dev mailing list.</p>
287 to the llvm/tools/clang root and run:</p>
291 <p>For example, for getting the diffs of all of clang:</p>
300 so changing directory to the llvm/tools/clang directory is recommended.</p>
302 <!--=====================================================================-->
304 <!--=====================================================================-->
306 <p>The LLVM IR generation part of clang handles conversion of the
309 "codegen", and the Clang code for this lives
312 <p>The output is most easily inspected using the <tt>-emit-llvm</tt>
313 option to clang (possibly in conjunction with <tt>-o -</tt>). You
314 can also use <tt>-emit-llvm-bc</tt> to write an LLVM bitcode file
315 which can be processed by the suite of LLVM tools
316 like <tt>llvm-dis</tt>, <tt>llvm-nm</tt>, etc. See the LLVM