@@ -283,14 +283,14 @@ manual, or execute ``cmake --help-variable VARIABLE_NAME``.
283
283
The path to install executables, relative to the *CMAKE_INSTALL_PREFIX *.
284
284
Defaults to "bin".
285
285
286
- **CMAKE_INSTALL_INCLUDEDIR **:PATH
287
- The path to install header files, relative to the *CMAKE_INSTALL_PREFIX *.
288
- Defaults to "include".
289
-
290
286
**CMAKE_INSTALL_DOCDIR **:PATH
291
287
The path to install documentation, relative to the *CMAKE_INSTALL_PREFIX *.
292
288
Defaults to "share/doc".
293
289
290
+ **CMAKE_INSTALL_INCLUDEDIR **:PATH
291
+ The path to install header files, relative to the *CMAKE_INSTALL_PREFIX *.
292
+ Defaults to "include".
293
+
294
294
**CMAKE_INSTALL_MANDIR **:PATH
295
295
The path to install manpage files, relative to the *CMAKE_INSTALL_PREFIX *.
296
296
Defaults to "share/man".
@@ -328,28 +328,22 @@ enabled sub-projects. Nearly all of these variable names begin with
328
328
allows for them to be specified as values in CMAKE_BUILD_TYPE without
329
329
encountering a fatal error during the configuration process.
330
330
331
- **LLVM_UNREACHABLE_OPTIMIZE **:BOOL
332
- This flag controls the behavior of `llvm_unreachable() ` in release build
333
- (when assertions are disabled in general). When ON (default) then
334
- `llvm_unreachable() ` is considered "undefined behavior" and optimized as
335
- such. When OFF it is instead replaced with a guaranteed "trap".
336
-
337
331
**LLVM_APPEND_VC_REV **:BOOL
338
332
Embed version control revision info (Git revision id).
339
333
The version info is provided by the ``LLVM_REVISION `` macro in
340
334
``llvm/include/llvm/Support/VCSRevision.h ``. Developers using git who don't
341
335
need revision info can disable this option to avoid re-linking most binaries
342
336
after a branch switch. Defaults to ON.
343
337
338
+ **LLVM_FORCE_VC_REPOSITORY **:STRING
339
+ Set the git repository to include in version info rather than calling git to
340
+ determine it.
341
+
344
342
**LLVM_FORCE_VC_REVISION **:STRING
345
343
Force a specific Git revision id rather than calling to git to determine it.
346
344
This is useful in environments where git is not available or non-functional
347
345
but the VC revision is available through other means.
348
346
349
- **LLVM_FORCE_VC_REPOSITORY **:STRING
350
- Set the git repository to include in version info rather than calling git to
351
- determine it.
352
-
353
347
**LLVM_BUILD_32_BITS **:BOOL
354
348
Build 32-bit executables and libraries on 64-bit systems. This option is
355
349
available only on some 64-bit Unix systems. Defaults to OFF.
@@ -381,22 +375,6 @@ enabled sub-projects. Nearly all of these variable names begin with
381
375
*LLVM_CODE_COVERAGE_TARGETS * and *LLVM_COVERAGE_SOURCE_DIRS * for more
382
376
information on configuring code coverage reports.
383
377
384
- **LLVM_CODE_COVERAGE_TARGETS **:STRING
385
- If set to a semicolon separated list of targets, those targets will be used
386
- to drive the code coverage reports. If unset, the target list will be
387
- constructed using the LLVM build's CMake export list.
388
-
389
- **LLVM_COVERAGE_SOURCE_DIRS **:STRING
390
- If set to a semicolon separated list of directories, the coverage reports
391
- will limit code coverage summaries to just the listed directories. If unset,
392
- coverage reports will include all sources identified by the tooling.
393
-
394
- **LLVM_INDIVIDUAL_TEST_COVERAGE **:BOOL
395
- Enable individual test case coverage. When set to ON, code coverage data for
396
- each test case will be generated and stored in a separate directory under the
397
- config.test_exec_root path. This feature allows code coverage analysis of each
398
- individual test case. Defaults to OFF.
399
-
400
378
**LLVM_BUILD_LLVM_DYLIB **:BOOL
401
379
If enabled, the target for building the libLLVM shared library is added.
402
380
This library contains all of LLVM's components in a single shared library.
@@ -429,15 +407,22 @@ enabled sub-projects. Nearly all of these variable names begin with
429
407
options, which are passed to the CCACHE_MAXSIZE and CCACHE_DIR environment
430
408
variables, respectively.
431
409
410
+ **LLVM_CODE_COVERAGE_TARGETS **:STRING
411
+ If set to a semicolon separated list of targets, those targets will be used
412
+ to drive the code coverage reports. If unset, the target list will be
413
+ constructed using the LLVM build's CMake export list.
414
+
415
+ **LLVM_COVERAGE_SOURCE_DIRS **:STRING
416
+ If set to a semicolon separated list of directories, the coverage reports
417
+ will limit code coverage summaries to just the listed directories. If unset,
418
+ coverage reports will include all sources identified by the tooling.
419
+
432
420
**LLVM_CREATE_XCODE_TOOLCHAIN **:BOOL
433
421
macOS Only: If enabled CMake will generate a target named
434
422
'install-xcode-toolchain'. This target will create a directory at
435
423
$CMAKE_INSTALL_PREFIX/Toolchains containing an xctoolchain directory which can
436
424
be used to override the default system tools.
437
425
438
- **LLVM_<target>_LINKER_FLAGS **:STRING
439
- Defines the set of linker flags that should be applied to a <target>.
440
-
441
426
**LLVM_DEFAULT_TARGET_TRIPLE **:STRING
442
427
LLVM target to use for code generation when no target is explicitly specified.
443
428
It defaults to "host", meaning that it shall pick the architecture
@@ -514,11 +499,6 @@ enabled sub-projects. Nearly all of these variable names begin with
514
499
**LLVM_ENABLE_EXPENSIVE_CHECKS **:BOOL
515
500
Enable additional time/memory expensive checking. Defaults to OFF.
516
501
517
- **LLVM_ENABLE_HTTPLIB **:BOOL
518
- Enables the optional cpp-httplib dependency which is used by llvm-debuginfod
519
- to serve debug info over HTTP. `cpp-httplib <https://github.com/yhirose/cpp-httplib >`_
520
- must be installed, or `httplib_ROOT ` must be set. Defaults to OFF.
521
-
522
502
**LLVM_ENABLE_FFI **:BOOL
523
503
Indicates whether the LLVM Interpreter will be linked with the Foreign Function
524
504
Interface library (libffi) in order to enable calling external functions.
@@ -527,6 +507,11 @@ enabled sub-projects. Nearly all of these variable names begin with
527
507
FFI_LIBRARY_DIR to the directories where ffi.h and libffi.so can be found,
528
508
respectively. Defaults to OFF.
529
509
510
+ **LLVM_ENABLE_HTTPLIB **:BOOL
511
+ Enables the optional cpp-httplib dependency which is used by llvm-debuginfod
512
+ to serve debug info over HTTP. `cpp-httplib <https://github.com/yhirose/cpp-httplib >`_
513
+ must be installed, or `httplib_ROOT ` must be set. Defaults to OFF.
514
+
530
515
**LLVM_ENABLE_IDE **:BOOL
531
516
Tell the build system that an IDE is being used. This in turn disables the
532
517
creation of certain convenience build system targets, such as the various
@@ -539,11 +524,6 @@ enabled sub-projects. Nearly all of these variable names begin with
539
524
passed to invocations of both so that the project is built using libc++
540
525
instead of stdlibc++. Defaults to OFF.
541
526
542
- **LLVM_ENABLE_LLVM_LIBC **: BOOL
543
- If the LLVM libc overlay is installed in a location where the host linker
544
- can access it, all built executables will be linked against the LLVM libc
545
- overlay before linking against the system libc. Defaults to OFF.
546
-
547
527
**LLVM_ENABLE_LIBPFM **:BOOL
548
528
Enable building with libpfm to support hardware counter measurements in LLVM
549
529
tools.
@@ -554,6 +534,11 @@ enabled sub-projects. Nearly all of these variable names begin with
554
534
build where a dependency is added from the first stage to the second ensuring
555
535
that lld is built before stage2 begins.
556
536
537
+ **LLVM_ENABLE_LLVM_LIBC **: BOOL
538
+ If the LLVM libc overlay is installed in a location where the host linker
539
+ can access it, all built executables will be linked against the LLVM libc
540
+ overlay before linking against the system libc. Defaults to OFF.
541
+
557
542
**LLVM_ENABLE_LTO **:STRING
558
543
Add ``-flto `` or ``-flto= `` flags to the compile and link command
559
544
lines, enabling link-time optimization. Possible values are ``Off ``,
@@ -581,6 +566,9 @@ enabled sub-projects. Nearly all of these variable names begin with
581
566
The full list is:
582
567
``clang;clang-tools-extra;cross-project-tests;libc;libclc;lld;lldb;openmp;polly;pstl ``
583
568
569
+ **LLVM_ENABLE_RTTI **:BOOL
570
+ Build LLVM with run-time type information. Defaults to OFF.
571
+
584
572
**LLVM_ENABLE_RUNTIMES **:STRING
585
573
Build libc++, libc++abi, libunwind or compiler-rt using the just-built compiler.
586
574
This is the correct way to build runtimes when putting together a toolchain.
@@ -593,10 +581,6 @@ enabled sub-projects. Nearly all of these variable names begin with
593
581
To enable all of them, use:
594
582
``LLVM_ENABLE_RUNTIMES=all ``
595
583
596
-
597
- **LLVM_ENABLE_RTTI **:BOOL
598
- Build LLVM with run-time type information. Defaults to OFF.
599
-
600
584
**LLVM_ENABLE_SPHINX **:BOOL
601
585
If specified, CMake will search for the ``sphinx-build `` executable and will make
602
586
the ``SPHINX_OUTPUT_HTML `` and ``SPHINX_OUTPUT_MAN `` CMake options available.
@@ -634,14 +618,6 @@ enabled sub-projects. Nearly all of these variable names begin with
634
618
llvm. This will build the experimental target without needing it to add to the
635
619
list of all the targets available in the LLVM's main CMakeLists.txt.
636
620
637
- **LLVM_EXTERNAL_{CLANG,LLD,POLLY}_SOURCE_DIR **:PATH
638
- These variables specify the path to the source directory for the external
639
- LLVM projects Clang, lld, and Polly, respectively, relative to the top-level
640
- source directory. If the in-tree subdirectory for an external project
641
- exists (e.g., llvm/tools/clang for Clang), then the corresponding variable
642
- will not be used. If the variable for an external project does not point
643
- to a valid path, then that project will not be built.
644
-
645
621
**LLVM_EXTERNAL_PROJECTS **:STRING
646
622
Semicolon-separated list of additional external projects to build as part of
647
623
llvm. For each project LLVM_EXTERNAL_<NAME>_SOURCE_DIR have to be specified
@@ -650,6 +626,14 @@ enabled sub-projects. Nearly all of these variable names begin with
650
626
-DLLVM_EXTERNAL_FOO_SOURCE_DIR=/src/foo
651
627
-DLLVM_EXTERNAL_BAR_SOURCE_DIR=/src/bar ``.
652
628
629
+ **LLVM_EXTERNAL_{CLANG,LLD,POLLY}_SOURCE_DIR **:PATH
630
+ These variables specify the path to the source directory for the external
631
+ LLVM projects Clang, lld, and Polly, respectively, relative to the top-level
632
+ source directory. If the in-tree subdirectory for an external project
633
+ exists (e.g., llvm/tools/clang for Clang), then the corresponding variable
634
+ will not be used. If the variable for an external project does not point
635
+ to a valid path, then that project will not be built.
636
+
653
637
**LLVM_EXTERNALIZE_DEBUGINFO **:BOOL
654
638
Generate dSYM files and strip executables and libraries (Darwin Only).
655
639
Defaults to OFF.
@@ -680,6 +664,12 @@ enabled sub-projects. Nearly all of these variable names begin with
680
664
Generate build targets for the LLVM tools. Defaults to ON. You can use this
681
665
option to disable the generation of build targets for the LLVM tools.
682
666
667
+ **LLVM_INDIVIDUAL_TEST_COVERAGE **:BOOL
668
+ Enable individual test case coverage. When set to ON, code coverage data for
669
+ each test case will be generated and stored in a separate directory under the
670
+ config.test_exec_root path. This feature allows code coverage analysis of each
671
+ individual test case. Defaults to OFF.
672
+
683
673
**LLVM_INSTALL_BINUTILS_SYMLINKS **:BOOL
684
674
Install symlinks from the binutils tool names to the corresponding LLVM tools.
685
675
For example, ar will be symlinked to llvm-ar.
@@ -702,6 +692,11 @@ enabled sub-projects. Nearly all of these variable names begin with
702
692
If enabled, utility binaries like ``FileCheck `` and ``not `` will be installed
703
693
to CMAKE_INSTALL_PREFIX.
704
694
695
+ **LLVM_INSTALL_DOXYGEN_HTML_DIR **:STRING
696
+ The path to install Doxygen-generated HTML documentation to. This path can
697
+ either be absolute or relative to the *CMAKE_INSTALL_PREFIX *. Defaults to
698
+ ``${CMAKE_INSTALL_DOCDIR}/llvm/doxygen-html ``.
699
+
705
700
**LLVM_INTEGRATED_CRT_ALLOC **:PATH
706
701
On Windows, allows embedding a different C runtime allocator into the LLVM
707
702
tools and libraries. Using a lock-free allocator such as the ones listed below
@@ -718,17 +713,15 @@ enabled sub-projects. Nearly all of these variable names begin with
718
713
This flag needs to be used along with the static CRT, ie. if building the
719
714
Release target, add -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded.
720
715
721
- **LLVM_INSTALL_DOXYGEN_HTML_DIR **:STRING
722
- The path to install Doxygen-generated HTML documentation to. This path can
723
- either be absolute or relative to the *CMAKE_INSTALL_PREFIX *. Defaults to
724
- ``${CMAKE_INSTALL_DOCDIR}/llvm/doxygen-html ``.
725
-
726
716
**LLVM_LINK_LLVM_DYLIB **:BOOL
727
717
If enabled, tools will be linked with the libLLVM shared library. Defaults
728
718
to OFF. Setting LLVM_LINK_LLVM_DYLIB to ON also sets LLVM_BUILD_LLVM_DYLIB
729
719
to ON.
730
720
This option is not available on Windows.
731
721
722
+ **LLVM_<target>_LINKER_FLAGS **:STRING
723
+ Defines the set of linker flags that should be applied to a <target>.
724
+
732
725
**LLVM_LIT_ARGS **:STRING
733
726
Arguments given to lit. ``make check `` and ``make clang-test `` are affected.
734
727
By default, ``'-sv --no-progress-bar' `` on Visual C++ and Xcode, ``'-sv' `` on
@@ -770,6 +763,10 @@ enabled sub-projects. Nearly all of these variable names begin with
770
763
**LLVM_PARALLEL_TABLEGEN_JOBS **:STRING
771
764
Define the maximum number of concurrent tablegen jobs.
772
765
766
+ **LLVM_PROFDATA_FILE **:PATH
767
+ Path to a profdata file to pass into clang's -fprofile-instr-use flag. This
768
+ can only be specified if you're building with clang.
769
+
773
770
**LLVM_RAM_PER_COMPILE_JOB **:STRING
774
771
Calculates the amount of Ninja compile jobs according to available resources.
775
772
Value has to be in MB, overwrites LLVM_PARALLEL_COMPILE_JOBS. Compile jobs
@@ -788,10 +785,6 @@ enabled sub-projects. Nearly all of these variable names begin with
788
785
Value has to be in MB, overwrites LLVM_PARALLEL_TABLEGEN_JOBS. Tablegen jobs
789
786
will be between one and amount of logical cores.
790
787
791
- **LLVM_PROFDATA_FILE **:PATH
792
- Path to a profdata file to pass into clang's -fprofile-instr-use flag. This
793
- can only be specified if you're building with clang.
794
-
795
788
**LLVM_REVERSE_ITERATION **:BOOL
796
789
If enabled, all supported unordered llvm containers would be iterated in
797
790
reverse order. This is useful for uncovering non-determinism caused by
@@ -829,6 +822,12 @@ enabled sub-projects. Nearly all of these variable names begin with
829
822
``LLVM_USE_SANITIZER `` contains ``Undefined ``. This can be used to override
830
823
the default set of UBSan flags.
831
824
825
+ **LLVM_UNREACHABLE_OPTIMIZE **:BOOL
826
+ This flag controls the behavior of `llvm_unreachable() ` in release build
827
+ (when assertions are disabled in general). When ON (default) then
828
+ `llvm_unreachable() ` is considered "undefined behavior" and optimized as
829
+ such. When OFF it is instead replaced with a guaranteed "trap".
830
+
832
831
**LLVM_USE_INTEL_JITEVENTS **:BOOL
833
832
Enable building support for Intel JIT Events API. Defaults to OFF.
834
833
@@ -892,6 +891,11 @@ Advanced variables
892
891
These are niche, and changing them from their defaults is more likely to cause
893
892
things to go wrong. They are also unstable across LLVM versions.
894
893
894
+ **LLVM_EXAMPLES_INSTALL_DIR **:STRING
895
+ The path for examples of using LLVM, relative to the *CMAKE_INSTALL_PREFIX *.
896
+ Only matters if *LLVM_BUILD_EXAMPLES * is enabled.
897
+ Defaults to "examples".
898
+
895
899
**LLVM_TOOLS_INSTALL_DIR **:STRING
896
900
The path to install the main LLVM tools, relative to the *CMAKE_INSTALL_PREFIX *.
897
901
Defaults to *CMAKE_INSTALL_BINDIR *.
@@ -901,11 +905,6 @@ things to go wrong. They are also unstable across LLVM versions.
901
905
Only matters if *LLVM_INSTALL_UTILS * is enabled.
902
906
Defaults to *LLVM_TOOLS_INSTALL_DIR *.
903
907
904
- **LLVM_EXAMPLES_INSTALL_DIR **:STRING
905
- The path for examples of using LLVM, relative to the *CMAKE_INSTALL_PREFIX *.
906
- Only matters if *LLVM_BUILD_EXAMPLES * is enabled.
907
- Defaults to "examples".
908
-
909
908
CMake Caches
910
909
============
911
910
0 commit comments