1
1
# The LLVM Compiler Infrastructure
2
2
3
- This directory and its subdirectories contain source code for LLVM,
3
+ This directory and its sub-directories contain source code for LLVM,
4
4
a toolkit for the construction of highly optimized compilers,
5
- optimizers, and runtime environments.
5
+ optimizers, and run-time environments.
6
6
7
7
The README briefly describes how to get started with building LLVM.
8
8
For more information on how to contribute to the LLVM project, please
@@ -37,9 +37,9 @@ The LLVM Getting Started documentation may be out of date. The [Clang
37
37
Getting Started] ( http://clang.llvm.org/get_started.html ) page might have more
38
38
accurate information.
39
39
40
- This is an example workflow and configuration to get and build the LLVM source:
40
+ This is an example work-flow and configuration to get and build the LLVM source:
41
41
42
- 1 . Checkout LLVM (including related subprojects like Clang):
42
+ 1 . Checkout LLVM (including related sub-projects like Clang):
43
43
44
44
* `` git clone https://github.com/llvm/llvm-project.git ``
45
45
@@ -56,7 +56,7 @@ This is an example workflow and configuration to get and build the LLVM source:
56
56
57
57
* `` cmake -G <generator> [options] ../llvm ``
58
58
59
- Some common generators are:
59
+ Some common build system generators are:
60
60
61
61
* `` Ninja `` --- for generating [ Ninja] ( https://ninja-build.org )
62
62
build files. Most llvm developers use Ninja.
@@ -68,15 +68,15 @@ This is an example workflow and configuration to get and build the LLVM source:
68
68
Some Common options:
69
69
70
70
* `` -DLLVM_ENABLE_PROJECTS='...' `` --- semicolon-separated list of the LLVM
71
- subprojects you'd like to additionally build. Can include any of: clang,
71
+ sub-projects you'd like to additionally build. Can include any of: clang,
72
72
clang-tools-extra, libcxx, libcxxabi, libunwind, lldb, compiler-rt, lld,
73
73
polly, or debuginfo-tests.
74
74
75
75
For example, to build LLVM, Clang, libcxx, and libcxxabi, use
76
76
`` -DLLVM_ENABLE_PROJECTS="clang;libcxx;libcxxabi" `` .
77
77
78
78
* `` -DCMAKE_INSTALL_PREFIX=directory `` --- Specify for * directory* the full
79
- pathname of where you want the LLVM tools and libraries to be installed
79
+ path name of where you want the LLVM tools and libraries to be installed
80
80
(default `` /usr/local `` ).
81
81
82
82
* `` -DCMAKE_BUILD_TYPE=type `` --- Valid options for * type* are Debug,
@@ -85,20 +85,21 @@ This is an example workflow and configuration to get and build the LLVM source:
85
85
* `` -DLLVM_ENABLE_ASSERTIONS=On `` --- Compile with assertion checks enabled
86
86
(default is Yes for Debug builds, No for all other build types).
87
87
88
- * Run your build tool of choice!
88
+ * `` cmake --build . [-- [options] <target>] `` or your build system specified above
89
+ directly.
89
90
90
91
* The default target (i.e. `` ninja `` or `` make `` ) will build all of LLVM.
91
92
92
93
* The `` check-all `` target (i.e. `` ninja check-all `` ) will run the
93
94
regression tests to ensure everything is in working order.
94
95
95
- * CMake will generate build targets for each tool and library, and most
96
+ * CMake will generate targets for each tool and library, and most
96
97
LLVM sub-projects generate their own `` check-<project> `` target.
97
98
98
- * Running a serial build will be * slow* . To improve speed, try running a
99
- parallel build. That's done by default in Ninja; for `` make `` , use
100
- `` make -j NNN`` ( NNN is the number of parallel jobs, use e.g. number of
101
- CPUs you have.)
99
+ * Running a serial build will be ** slow* * . To improve speed, try running a
100
+ parallel build. That's done by default in Ninja; for `` make `` , use the option
101
+ `` -j NNN `` , where `` NNN `` is the number of parallel jobs, e.g. the number of
102
+ CPUs you have.
102
103
103
104
* For more information see [ CMake] ( https://llvm.org/docs/CMake.html )
104
105
0 commit comments