@@ -474,27 +474,27 @@ We can see the steps created by clang to generate the offloading code using the
474
474
Relocatable Linking
475
475
-------------------
476
476
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
482
482
the :doc: `linker wrapper documentation<ClangLinkerWrapper> `.
483
483
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
488
488
library's device code, or for shipping libraries to incompatible compilers.
489
489
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
494
494
merge the registration code into the final relocatable object file.
495
495
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
498
498
redistributed without requiring any additional handling.
499
499
500
500
.. code-block :: console
0 commit comments