Skip to content

Commit 917f022

Browse files
[llvm] Proofread BuildingADistribution.rst (#155978)
1 parent d3dcd0d commit 917f022

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

llvm/docs/BuildingADistribution.rst

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Introduction
99
============
1010

1111
This document is geared toward people who want to build and package LLVM and any
12-
combination of LLVM sub-project tools for distribution. This document covers
12+
combination of its sub-project tools for distribution. This document covers
1313
useful features of the LLVM build system as well as best practices and general
1414
information about packaging LLVM.
1515

@@ -20,7 +20,7 @@ workings of the builds described in the :doc:`AdvancedBuilds` document.
2020
General Distribution Guidance
2121
=============================
2222

23-
When building a distribution of a compiler it is generally advised to perform a
23+
When building a distribution of a compiler, it is generally advised to perform a
2424
bootstrap build of the compiler. That means building a "stage 1" compiler with
2525
your host toolchain, then building the "stage 2" compiler using the "stage 1"
2626
compiler. This is done so that the compiler you distribute benefits from all the
@@ -57,7 +57,7 @@ at process launch time, which can be very slow for C++ code.
5757

5858
The simplest example of building a distribution with reasonable performance is
5959
captured in the DistributionExample CMake cache file located at
60-
clang/cmake/caches/DistributionExample.cmake. The following command will perform
60+
``clang/cmake/caches/DistributionExample.cmake``. The following commands will perform
6161
and install the distribution build:
6262

6363
.. code-block:: console
@@ -69,7 +69,7 @@ and install the distribution build:
6969
Difference between ``install`` and ``install-distribution``
7070
-----------------------------------------------------------
7171

72-
One subtle but important thing to note is the difference between the ``install``
72+
One subtle but important difference to note is between the ``install``
7373
and ``install-distribution`` targets. The ``install`` target is expected to
7474
install every part of LLVM that your build is configured to generate except the
7575
LLVM testing tools. Alternatively the ``install-distribution`` target, which is
@@ -137,7 +137,7 @@ Special Notes for Library-only Distributions
137137

138138
One of the most powerful features of LLVM is its library-first design mentality
139139
and the way you can compose a wide variety of tools using different portions of
140-
LLVM. Even in this situation using *BUILD_SHARED_LIBS* is not supported. If you
140+
LLVM. Even in this situation, using *BUILD_SHARED_LIBS* is not supported. If you
141141
want to distribute LLVM as a shared library for use in a tool, the recommended
142142
method is using *LLVM_BUILD_LLVM_DYLIB*, and you can use *LLVM_DYLIB_COMPONENTS*
143143
to configure which LLVM components are part of libLLVM.
@@ -147,7 +147,7 @@ Options for Optimizing LLVM
147147
===========================
148148

149149
There are four main build optimizations that our CMake build system supports.
150-
When performing a bootstrap build it is not beneficial to do anything other than
150+
When performing a bootstrap build, it is not beneficial to do anything other than
151151
setting *CMAKE_BUILD_TYPE* to ``Release`` for the stage-1 compiler. This is
152152
because the more intensive optimizations are expensive to perform and the
153153
stage-1 compiler is thrown away. All of the further options described should be
@@ -162,7 +162,7 @@ debug information and use ``-O3`` you can override the
162162
*CMAKE_<LANG>_FLAGS_RELWITHDEBINFO* option for C and CXX.
163163
DistributionExample.cmake does this.
164164

165-
Another easy to use option is Link-Time-Optimization. You can set the
165+
Another easy-to-use option is Link-Time-Optimization. You can set the
166166
*LLVM_ENABLE_LTO* option on your stage-2 build to ``Thin`` or ``Full`` to enable
167167
building LLVM with LTO. These options will significantly increase link time of
168168
the binaries in the distribution, but it will create much faster binaries. This
@@ -175,7 +175,7 @@ in-tree profiling tests are very limited, and generating the profile takes a
175175
significant amount of time, but it can result in a significant improvement in
176176
the performance of the generated binaries.
177177

178-
In addition to PGO profiling we also have limited support in-tree for generating
178+
In addition to PGO profiling, we also have limited in-tree support for generating
179179
linker order files. These files provide the linker with a suggested ordering for
180180
functions in the final binary layout. This can measurably speed up clang by
181181
physically grouping functions that are called temporally close to each other.
@@ -187,7 +187,7 @@ Options for Reducing Size
187187
=========================
188188

189189
.. warning::
190-
Any steps taken to reduce the binary size will come at a cost of runtime
190+
Any steps taken to reduce binary size will come at the cost of runtime
191191
performance in the generated binaries.
192192

193193
The simplest and least significant way to reduce binary size is to set the
@@ -197,7 +197,7 @@ both the least benefit to size and the least impact on performance.
197197

198198
The most impactful way to reduce binary size is to dynamically link LLVM into
199199
all the tools. This reduces code size by decreasing duplication of common code
200-
between the LLVM-based tools. This can be done by setting the following two
200+
among the LLVM-based tools. This can be done by setting the following two
201201
CMake options to ``On``: *LLVM_BUILD_LLVM_DYLIB* and *LLVM_LINK_LLVM_DYLIB*.
202202

203203
.. warning::
@@ -214,35 +214,35 @@ that are already documented include: *LLVM_TARGETS_TO_BUILD*, *LLVM_ENABLE_PROJE
214214
*LLVM_ENABLE_RUNTIMES*, *LLVM_BUILD_LLVM_DYLIB*, and *LLVM_LINK_LLVM_DYLIB*.
215215

216216
**LLVM_ENABLE_RUNTIMES**:STRING
217-
When building a distribution that includes LLVM runtime projects (i.e. libcxx,
217+
When building a distribution that includes LLVM runtime projects (i.e., libcxx,
218218
compiler-rt, libcxxabi, libunwind...), it is important to build those projects
219219
with the just-built compiler.
220220

221221
**LLVM_DISTRIBUTION_COMPONENTS**:STRING
222-
This variable can be set to a semi-colon separated list of LLVM build system
222+
This variable can be set to a semicolon-separated list of LLVM build system
223223
components to install. All LLVM-based tools are components, as well as most
224224
of the libraries and runtimes. Component names match the names of the build
225225
system targets.
226226

227227
**LLVM_DISTRIBUTIONS**:STRING
228-
This variable can be set to a semi-colon separated list of distributions. See
228+
This variable can be set to a semicolon-separated list of distributions. See
229229
the :ref:`Multi-distribution configurations` section above for details on this
230230
and other CMake variables to configure multiple distributions.
231231

232232
**LLVM_RUNTIME_DISTRIBUTION_COMPONENTS**:STRING
233-
This variable can be set to a semi-colon separated list of runtime library
233+
This variable can be set to a semicolon-separated list of runtime library
234234
components. This is used in conjunction with *LLVM_ENABLE_RUNTIMES* to specify
235235
components of runtime libraries that you want to include in your distribution.
236236
Just like with *LLVM_DISTRIBUTION_COMPONENTS*, component names match the names
237237
of the build system targets.
238238

239239
**LLVM_DYLIB_COMPONENTS**:STRING
240-
This variable can be set to a semi-colon separated name of LLVM library
240+
This variable can be set to a semicolon-separated name of LLVM library
241241
components. LLVM library components are either library names with the LLVM
242-
prefix removed (i.e. Support, Demangle...), LLVM target names, or special
242+
prefix removed (i.e., Support, Demangle...), LLVM target names, or special
243243
purpose component names. The special purpose component names are:
244244

245-
#. ``all`` - All LLVM available component libraries
245+
#. ``all`` - All available LLVM component libraries
246246
#. ``Native`` - The LLVM target for the Native system
247247
#. ``AllTargetsAsmParsers`` - All the included target ASM parsers libraries
248248
#. ``AllTargetsDescs`` - All the included target descriptions libraries

0 commit comments

Comments
 (0)