Skip to content

Commit 115b6a3

Browse files
[Sanitizer][Docs] Improve docs on building Asan (#68636)
1 parent 3684f6a commit 115b6a3

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

clang/docs/AddressSanitizer.rst

+10-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,16 @@ Typical slowdown introduced by AddressSanitizer is **2x**.
2626
How to build
2727
============
2828

29-
Build LLVM/Clang with `CMake <https://llvm.org/docs/CMake.html>`_.
29+
Build LLVM/Clang with `CMake <https://llvm.org/docs/CMake.html>` and enable
30+
the ``compiler-rt`` runtime. An example CMake configuration that will allow
31+
for the use/testing of AddressSanitizer:
32+
33+
.. code-block:: console
34+
35+
cmake -DCMAKE_BUILD_TYPE=Release \
36+
-DLLVM_ENABLE_PROJECTS="clang" \
37+
-DLLVM_ENABLE_RUNTIMES="compiler-rt" \
38+
../llvm
3039
3140
Usage
3241
=====

0 commit comments

Comments
 (0)