Lines Matching +full:check +full:- +full:clang +full:- +full:python

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=utf-8">
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>
40 <!--=====================================================================-->
42 <!--=====================================================================-->
44 <p>Clang follows the
47 and to match the style of the code to that present in Clang (for example, in
50 <p>Clang has a few additional coding standards:</p>
55 upon clients and block integrating Clang as a library. Libraries should
57 output. See <a href="https://llvm.org/docs/CodingStandards.html#use-raw-ostream">Coding
61 <!--=====================================================================-->
63 <!--=====================================================================-->
65 <p>Both Clang and LLVM use doxygen to provide API documentation. Their
68 <li><a href="https://clang.llvm.org/doxygen">Clang</a></li>
76 <!--=====================================================================-->
78 <!--=====================================================================-->
82 <li>Many LLVM and Clang data structures provide
93 <a href="https://github.com/llvm/llvm-project/blob/main/llvm/utils/lldbDataFormatters.py">
97 <!--=====================================================================-->
99 <!--=====================================================================-->
102 <a href="https://github.com/llvm/llvm-project/blob/main/llvm/utils/LLVMVisualizers/llvm.natvis">
104 <a href="https://github.com/llvm/llvm-project/blob/main/clang/utils/ClangVisualizers/clang.natvis">
105 <tt>clang/utils/ClangVisualizers/clang.natvis</tt></a> provide debugger visualizers
111 <a href="https://learn.microsoft.com/en-us/visualstudio/debugger/create-custom-views-of-native-objects">
114 <!--=====================================================================-->
116 <!--=====================================================================-->
118 <!--=====================================================================-->
119 <h3 id="testingNonWindows">Testing on Unix-like Systems</h3>
120 <!--=====================================================================-->
122 <p>Clang includes a basic regression suite in the tree which can be
123 run with <tt>make test</tt> from the top-level clang directory, or
124 just <tt>make</tt> in the <em>test</em> sub-directory.
128 <p>If you built LLVM and Clang using CMake, the test suite can be run
129 with <tt>make check-clang</tt> from the top-level LLVM directory.</p>
134 beginning indicating the Clang compile options to use, to be read
143 <pre>--- Running clang tests for i686-pc-linux-gnu ---</pre>
156 /home/john/llvm/tools/clang/test/SemaCXX/member-name-lookup.cpp
157 /home/john/llvm/tools/clang/test/SemaCXX/namespace-alias.cpp
158 /home/john/llvm/tools/clang/test/SemaCXX/using-directive.cpp
166 <tt>make test VG=1</tt> in the top-level clang directory.</p>
169 the <a href="https://llvm.org/docs/TestingGuide.html#quick-start">LLVM
170 Test Suite</a> with clang is recommended. Currently the best way to
171 override LLVMGCC, as in: <tt>make LLVMGCC="clang -std=gnu89"
172 TEST=nightly report</tt> (make sure <tt>clang</tt> is in your PATH or use the
175 <!--=====================================================================-->
177 <!--=====================================================================-->
179 <p>The Clang test suite can be run from either Visual Studio or
183 Python, which must be installed. Find Python at:
184 <a href="https://www.python.org/downloads/">https://www.python.org/downloads/</a>.
196 for running the tests, "check-clang" being the root. Therefore, to
197 run the test from Visual Studio, right-click the check-clang project
207 <!--=====================================================================-->
209 <!--=====================================================================-->
212 be convenient to run the test harness on the command-line directly. Before
223 python (path to llvm)\llvm\utils\lit\lit.py -sv
224 --param=build_mode=Win32 --param=build_config=Debug
225 --param=clang_site_config=(build dir)\tools\clang\test\lit.site.cfg
226 (path to llvm)\llvm\tools\clang\test
231 <tt>--param=build_config=(build config)</tt>. You may also need to specify
232 the build mode (Win32, etc) via <tt>--param=build_mode=(build mode)</tt>.</p>
235 lives in (build dir)\tools\clang\test, via
236 <tt>--param=clang_site_config=(build dir)\tools\clang\test\lit.site.cfg</tt>.
242 python (path to llvm)\llvm\utils\lit\lit.py -sv
243 --param=build_mode=Win32 --param=build_config=Debug
244 --param=clang_site_config=(build dir)\tools\clang\test\lit.site.cfg
245 (path to llvm)\llvm\tools\clang\test\(dir)\(test)
251 python C:\Tools\llvm\utils\lit\lit.py -sv
252 --param=build_mode=Win32 --param=build_config=Debug
253 --param=clang_site_config=C:\Tools\build\tools\clang\test\lit.site.cfg
254 C:\Tools\llvm\tools\clang\test\Sema\wchar.c
257 <p>The -sv option above tells the runner to show the test output if
260 <p>You can also pass in the --no-progress-bar option if you wish to disable
265 <pre>lit.py: lit.cfg:152: note: using clang: 'C:\Tools\llvm\bin\Release\clang.EXE'
266 -- Testing: Testing: 2534 tests, 4 threads --
276 <!--=====================================================================-->
278 <!--=====================================================================-->
280 <p>Some changes in Clang affect <a href="https://libcxx.llvm.org">libc++</a>,
283 <li>Changing the output of Clang's diagnostics.</li>
291 <a href="https://buildkite.com/llvm-project/libcxx-ci">pre-commit CI</a>.
293 <p>For most configurations, the pre-commit CI uses a recent
294 <a href="https://apt.llvm.org/">nightly build</a> of Clang from LLVM's main
295 branch. These configurations do <em>not</em> use the Clang changes in the
298 <p>The &quot;Bootstrapping build&quot; builds Clang and uses it to build and
299 test libc++. This build <em>does</em> use the Clang changes in the patch.</p>
301 <p>Libc++ supports multiple versions of Clang. Therefore when a patch changes
306 <a href="https://libcxx.llvm.org/Contributing.html#pre-commit-ci">
307 documentation</a> about the pre-commit CI. For questions regarding
311 <!--=====================================================================-->
313 <!--=====================================================================-->
315 <p>To contribute changes to Clang see
316 <a href="https://llvm.org/docs/GettingStarted.html#sending-patches">LLVM's Getting Started page</a></p>
318 <!--=====================================================================-->
320 <!--=====================================================================-->
322 <p>The LLVM IR generation part of clang handles conversion of the
325 "codegen", and the Clang code for this lives
328 <p>The output is most easily inspected using the <tt>-emit-llvm</tt>
329 option to clang (possibly in conjunction with <tt>-o -</tt>). You
330 can also use <tt>-emit-llvm-bc</tt> to write an LLVM bitcode file
332 like <tt>llvm-dis</tt>, <tt>llvm-nm</tt>, etc. See the LLVM