Skip to content

Commit 347ab99

Browse files
committed
[Clang][Docs] Fix trailing whitespace warnings
1 parent b0b0bf6 commit 347ab99

File tree

2 files changed

+26
-26
lines changed

2 files changed

+26
-26
lines changed

clang/docs/ClangLinkerWrapper.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -64,19 +64,19 @@ only for the linker wrapper will be forwarded to the wrapped linker job.
6464
Relocatable Linking
6565
===================
6666

67-
The ``clang-linker-wrapper`` handles linking embedded device code and then
68-
registering it with the appropriate runtime. Normally, this is only done when
69-
the executable is created so other files containing device code can be linked
70-
together. This can be somewhat problematic for users who wish to ship static
71-
libraries that contain offloading code to users without a compatible offloading
67+
The ``clang-linker-wrapper`` handles linking embedded device code and then
68+
registering it with the appropriate runtime. Normally, this is only done when
69+
the executable is created so other files containing device code can be linked
70+
together. This can be somewhat problematic for users who wish to ship static
71+
libraries that contain offloading code to users without a compatible offloading
7272
toolchain.
7373

74-
When using a relocatable link with ``-r``, the ``clang-linker-wrapper`` will
75-
perform the device linking and registration eagerly. This will remove the
76-
embedded device code and register it correctly with the runtime. Semantically,
77-
this is similar to creating a shared library object. If standard relocatable
78-
linking is desired, simply do not run the binaries through the
79-
``clang-linker-wrapper``. This will simply append the embedded device code so
74+
When using a relocatable link with ``-r``, the ``clang-linker-wrapper`` will
75+
perform the device linking and registration eagerly. This will remove the
76+
embedded device code and register it correctly with the runtime. Semantically,
77+
this is similar to creating a shared library object. If standard relocatable
78+
linking is desired, simply do not run the binaries through the
79+
``clang-linker-wrapper``. This will simply append the embedded device code so
8080
that it can be linked later.
8181

8282
Example

clang/docs/OffloadingDesign.rst

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -474,27 +474,27 @@ We can see the steps created by clang to generate the offloading code using the
474474
Relocatable Linking
475475
-------------------
476476

477-
The offloading compilation pipeline normally will defer the final device linking
478-
and runtime registration until the ``clang-linker-wrapper`` is run to create the
479-
executable. This is the standard behaviour when compiling for OpenMP offloading
480-
or CUDA and HIP in ``-fgpu-rdc`` mode. However, there are some cases where the
481-
user may wish to perform this device handling prematurely. This is described in
477+
The offloading compilation pipeline normally will defer the final device linking
478+
and runtime registration until the ``clang-linker-wrapper`` is run to create the
479+
executable. This is the standard behaviour when compiling for OpenMP offloading
480+
or CUDA and HIP in ``-fgpu-rdc`` mode. However, there are some cases where the
481+
user may wish to perform this device handling prematurely. This is described in
482482
the :doc:`linker wrapper documentation<ClangLinkerWrapper>`.
483483

484-
Effectively, this allows the user to handle offloading specific linking ahead of
485-
time when shipping objects or static libraries. This can be thought of as
486-
performing a standard ``-fno-gpu-rdc`` compilation on a subset of object files.
487-
This can be useful to reduce link time, prevent users from interacting with the
484+
Effectively, this allows the user to handle offloading specific linking ahead of
485+
time when shipping objects or static libraries. This can be thought of as
486+
performing a standard ``-fno-gpu-rdc`` compilation on a subset of object files.
487+
This can be useful to reduce link time, prevent users from interacting with the
488488
library's device code, or for shipping libraries to incompatible compilers.
489489

490-
Normally, if a relocatable link is done using ``clang -r`` it will simply merge
491-
the ``.llvm.offloading`` sections which will then be linked later when the
492-
executable is created. However, if the ``-r`` flag is used with the offloading
493-
toolchain, it will perform the device linking and registration phases and then
490+
Normally, if a relocatable link is done using ``clang -r`` it will simply merge
491+
the ``.llvm.offloading`` sections which will then be linked later when the
492+
executable is created. However, if the ``-r`` flag is used with the offloading
493+
toolchain, it will perform the device linking and registration phases and then
494494
merge the registration code into the final relocatable object file.
495495

496-
The following example shows how using the relocatable link with the offloading
497-
pipeline can create a static library with offloading code that can be
496+
The following example shows how using the relocatable link with the offloading
497+
pipeline can create a static library with offloading code that can be
498498
redistributed without requiring any additional handling.
499499

500500
.. code-block:: console

0 commit comments

Comments
 (0)