• Home
  • Raw
  • Download

Lines Matching +full:ninja +full:- +full:test +full:- +full:arm64

8 -------------------
11 <https://llvm.org/docs/GettingStarted.html#getting-started-with-llvm>`_ for
15 Git browser: https://github.com/llvm/llvm-project/tree/master/lldb
18 -------------
31 * `Ninja <https://ninja-build.org>`_ (strongly recommended)
33 If you want to run the test suite, you'll need to build LLDB with Python
46 By default they are auto-detected: if CMake can find the dependency it will be
52 +-------------------+------------------------------------------------------+-----------------------…
56 +-------------------+------------------------------------------------------+-----------------------…
58 +-------------------+------------------------------------------------------+-----------------------…
60 +-------------------+------------------------------------------------------+-----------------------…
62 +-------------------+------------------------------------------------------+-----------------------…
64 +-------------------+------------------------------------------------------+-----------------------…
66 +-------------------+------------------------------------------------------+-----------------------…
73 > yum install libedit-devel libxml2-devel ncurses-devel python-devel swig
74 > sudo apt-get install build-essential subversion swig python3-dev libedit-dev libncurses5-dev
76 > pkgin install swig python27 cmake ninja-build
77 > brew install swig cmake ninja
96 <https://github.com/Microsoft/PTVS/releases>`_. If you plan to debug test
128 * To use the in-tree debug server on macOS, lldb needs to be code signed. For
134 ------------------------
138 source-tree with git:
142 > git clone https://github.com/llvm/llvm-project.git
144 CMake is a cross-platform build-generator tool. CMake does not build the
146 build tool for LLVM is Ninja, but other generators like Xcode or Visual Studio
150 Regular in-tree builds
153 Create a new directory for your build-tree. From there run CMake and point it
154 to the ``llvm`` directory in the source-tree:
158 > cmake -G Ninja -DLLVM_ENABLE_PROJECTS="clang;lldb" [<cmake options>] path/to/llvm-project/llvm
160 We used the ``LLVM_ENABLE_PROJECTS`` option here to tell the build-system which
162 :ref:`CommonCMakeOptions` and :ref:`CMakeCaches`). Parts of the LLDB test suite
164 run ninja to perform the actual build. We pass ``lldb`` here as the target, so
169 > ninja lldb
174 This is another way to build LLDB. We can use the same source-tree as we
175 checked out above, but now we will have multiple build-trees:
177 * the main build-tree for LLDB in ``/path/to/lldb-build``
178 * one or more provided build-trees for LLVM and Clang; for simplicity we use a
179 single one in ``/path/to/llvm-build``
181 Run CMake with ``-B`` pointing to a new directory for the provided
182 build-tree\ :sup:`1` and the positional argument pointing to the ``llvm``
183 directory in the source-tree. Note that we leave out LLDB here and only include
184 Clang. Then we build the ``ALL`` target with ninja:
188 > cmake -B /path/to/llvm-build -G Ninja \
189 -DLLVM_ENABLE_PROJECTS=clang \
190 [<more cmake options>] /path/to/llvm-project/llvm
191 > ninja
193 Now run CMake a second time with ``-B`` pointing to a new directory for the
194 main build-tree and the positional argument pointing to the ``lldb`` directory
195 in the source-tree. In order to find the provided build-tree, the build system
198 (CMake variables are case-sensitive!):
202 > cmake -B /path/to/lldb-build -G Ninja \
203 -DLLVM_DIR=/path/to/llvm-build/lib/cmake/llvm \
204 [<more cmake options>] /path/to/llvm-project/lldb
205 > ninja lldb
209 #. The ``-B`` argument was undocumented for a while and is only officially
211 <https://cmake.org/cmake/help/v3.14/release/3.14.html#command-line>`_
219 you are likely to encounter. A variable FOO is set by adding ``-DFOO=value`` to
222 If you want to debug the lldb that you're building -- that is, build it with
223 debug info enabled -- pass two additional arguments to cmake before running
224 ninja:
228 > cmake -G Ninja \
229 -DLLDB_EXPORT_ALL_SYMBOLS=1 \
230 -DCMAKE_BUILD_TYPE=Debug
233 If you want to run the test suite, you will need a compiler to build the test
235 Alternatively, you can specify a C and C++ compiler to be used by the test
240 > cmake -G Ninja \
241 -DLLDB_TEST_COMPILER=<path to C compiler> \
245 test execution.
250 On Windows the LLDB test suite requires lld. Either add ``lld`` to
251 ``LLVM_ENABLE_PROJECTS`` or disable the test suite with
259 crashes while running the test suite. If set to 0, LLDB will silently crash.
278 > cmake -G Ninja^
279 -DLLDB_TEST_DEBUG_TEST_CRASHES=1^
280 -DPYTHON_HOME=C:\Python35^
281 -DLLDB_TEST_COMPILER=d:\src\llvmbuild\ninja_release\bin\clang.exe^
285 Building with ninja is both faster and simpler than building with Visual Studio,
288 compiling (the ninja folder), and one for editing, browsing and debugging.
295 …> cmake -G "Visual Studio 15 2017 Win64" -Thost=x64 <cmake variables> <path to root of llvm source…
300 ninja tree.
306 On macOS the LLDB test suite requires libc++. Either add ``libcxx`` to
307 ``LLVM_ENABLE_PROJECTS`` or disable the test suite with
311 * ``LLDB_CODESIGN_IDENTITY:STRING``: Set the identity to use for code-signing
313 code-signed with identity ``lldb_codesign`` (see :ref:`CodeSigning`).
315 functional without setting up code-signing.
324 CMake scripts and can be useful to reproduce builds for particular use-cases
326 A cache is passed to CMake with the ``-C`` flag, following the absolute path to
327 the file on disk. Subsequent ``-D`` options are still allowed. Please find the
329 <https://github.com/llvm/llvm-project/tree/master/lldb/cmake/caches>`_
335 Build, test and install a distribution of LLDB from the `monorepo
336 <https://github.com/llvm/llvm-project>`_ (see also `Building a Distribution of
341 > git clone https://github.com/llvm/llvm-project
343 > cmake -B /path/to/lldb-build -G Ninja \
344 -C /path/to/llvm-project/lldb/cmake/caches/Apple-lldb-macOS.cmake \
345 -DLLVM_ENABLE_PROJECTS="clang;libcxx;lldb" \
346 llvm-project/llvm
348 > DESTDIR=/path/to/lldb-install ninja -C /path/to/lldb-build check-lldb install-distribution
356 > git clone https://github.com/llvm/llvm-project
358 > cmake -B /path/to/llvm-build -G Ninja \
359 -C /path/to/llvm-project/lldb/cmake/caches/Apple-lldb-base.cmake \
360 -DLLVM_ENABLE_PROJECTS="clang;libcxx" \
361 llvm-project/llvm
362 > ninja -C /path/to/llvm-build
364 > cmake -B /path/to/lldb-build \
365 -C /path/to/llvm-project/lldb/cmake/caches/Apple-lldb-Xcode.cmake \
366 -DLLVM_DIR=/path/to/llvm-build/lib/cmake/llvm \
367 llvm-project/lldb
369 > cmake --build /path/to/lldb-build --target check-lldb
373 The ``-B`` argument was undocumented for a while and is only officially
375 <https://cmake.org/cmake/help/v3.14/release/3.14.html#command-line>`_
379 --------------------------
394 > sudo apt-get install doxygen graphviz python3-sphinx
401 > ninja docs-lldb-html
402 > ninja docs-lldb-man
403 > ninja lldb-cpp-doc
404 > ninja lldb-python-doc
406 Cross-compiling LLDB
407 --------------------
412 this is often not feasible, and in these cases you will need to cross-compile
415 Cross-compilation is often a daunting task and has a lot of quirks which depend
418 provide an overview of the cross-compilation process along with the main things
424 that. Alternatively you can use system clang or even cross-gcc if your
425 distribution provides such packages (e.g., ``g++-aarch64-linux-gnu`` on
432 either a cross-package if one is available, or cross-compiling the respective
439 -DLLDB_ENABLE_PYTHON=0
440 -DLLDB_ENABLE_LIBEDIT=0
441 -DLLDB_ENABLE_CURSES=0
442 -DLLVM_ENABLE_TERMINFO=0
451 * ``CMAKE_CROSSCOMPILING`` : Set to 1 to enable cross-compilation.
462 * ``LLVM_TABLEGEN``, ``CLANG_TABLEGEN`` : Paths to llvm-tblgen and clang-tblgen
465 you will need to build the llvm-tblgen and clang-tblgen host targets at
467 * ``LLVM_HOST_TRIPLE`` : The triple of the system that lldb (or lldb-server)
475 Example 1: Cross-compiling for linux arm64 on Ubuntu host
478 Ubuntu already provides the packages necessary to cross-compile LLDB for arm64.
479 It is sufficient to install packages ``gcc-aarch64-linux-gnu``,
480 ``g++-aarch64-linux-gnu``, ``binutils-aarch64-linux-gnu``. Then it is possible
485 -DCMAKE_CROSSCOMPILING=1 \
486 -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc \
487 -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ \
488 -DLLVM_HOST_TRIPLE=aarch64-unknown-linux-gnu \
489 -DLLVM_TABLEGEN=<path-to-host>/bin/llvm-tblgen \
490 -DCLANG_TABLEGEN=<path-to-host>/bin/clang-tblgen \
491 -DLLDB_ENABLE_PYTHON=0 \
492 -DLLDB_ENABLE_LIBEDIT=0 \
493 -DLLDB_ENABLE_CURSES=0
497 successful cross-compile, so we need to help it with a couple of CFLAGS
504 -target aarch64-linux-gnu \
505 -I /usr/aarch64-linux-gnu/include/c++/4.8.2/aarch64-linux-gnu \
506 -I /usr/aarch64-linux-gnu/include
509 ``-DLLDB_ENABLE_PYTHON=0`` and other options, you would need to obtain the
511 to use the qemu-debootstrap utility, which can prepare a system image using
513 necessary packages in this environment (python-dev, libedit-dev, etc.) and
514 point your compiler to use them using the correct -I and -L arguments.
516 Example 2: Cross-compiling for Android on Linux
532 arm64 build:
536 -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake \
537 -DANDROID_ABI=arm64-v8a \
538 -DANDROID_PLATFORM=android-21 \
539 -DANDROID_ALLOW_UNDEFINED_SYMBOLS=On \
540 -DLLVM_HOST_TRIPLE=aarch64-unknown-linux-android \
541 -DCROSS_TOOLCHAIN_FLAGS_NATIVE='-DCMAKE_C_COMPILER=cc;-DCMAKE_CXX_COMPILER=c++'
543 Note that currently only lldb-server is functional on android. The lldb client
547 ------------------------
557 the -P flag:
561 > export PYTHONPATH=`$llvm/build/Debug+Asserts/bin/lldb -P`
564 to adjust the above to suit your needs. To test that the lldb Python module is
569 > python -c 'import lldb'
579 ---------------------
581 To use the in-tree debug server on macOS, lldb needs to be code signed. The
587 * ``scripts/macos-setup-codesign.sh``
591 cmake, specify ``-DLLDB_USE_SYSTEM_DEBUGSERVER=ON``.
593 If you have re-installed a new OS, please delete all old ``lldb_codesign`` items