Lines Matching +full:docs +full:- +full:openmp +full:- +full:html
8 .. _clang-linker-wrapper:
28 .. code-block:: console
30 USAGE: clang-linker-wrapper [options] -- <options to passed to the linker>
33 --cuda-path=<dir> Set the system CUDA path
34 --device-debug Use debugging
35 --device-linker=<value> or <triple>=<value>
37 --dry-run Print program arguments without running
38 --help-hidden Display all available options
39 --help Display available options (--help-hidden for more)
40 --host-triple=<triple> Triple to use for the host compilation
41 --linker-path=<path> The linker executable to invoke
42 -L <dir> Add <dir> to the library search path
43 -l <libname> Search for library <libname>
44 --opt-level=<O0, O1, O2, or O3>
46 --override-image=<kind=file>
48 -o <path> Path to file to write output
49 --pass-remarks-analysis=<value>
51 --pass-remarks-missed=<value>
53 --pass-remarks=<value> Pass remarks for LTO
54 --print-wrapped-module Print the wrapped module's IR for testing
55 --ptxas-arg=<value> Argument to pass to the 'ptxas' invocation
56 --relocatable Link device code to create a relocatable offloading application
57 --save-temps Save intermediate results
58 --sysroot<value> Set the system root
59 --verbose Verbose output from tools
60 --v Display the version number and exit
61 -- The separator for the wrapped linker arguments
66 The ``clang-linker-wrapper`` handles linking embedded device code and then
73 When using a relocatable link with ``-r``, the ``clang-linker-wrapper`` will
78 ``clang-linker-wrapper``. This will simply append the embedded device code so
94 some scenarios. The behavior of the linker-wrapper is controlled mostly through
96 <https://clang.llvm.org/docs/OffloadingDesign.html>`_. Intermediate output can
97 be obtained from the linker-wrapper using the ``--save-temps`` flag. These files
100 .. code-block:: sh
102 $> clang openmp.c -fopenmp --offload-arch=gfx90a -c
103 $> clang openmp.o -fopenmp --offload-arch=gfx90a -Wl,--save-temps
105 $> llvm-objcopy --update-section=.llvm.offloading=out.bc openmp.o
108 embedded offloading metadata with a user-modified version. However, this will be
110 ``--override-image=<kind>=<file>`` flag can be used.
112 In the following example, we use the ``--save-temps`` to obtain the LLVM-IR just
114 compile it to a binary. This can then be passed to the linker-wrapper which will
118 .. code-block:: sh
120 $> clang openmp.c -fopenmp --offload-arch=gfx90a -Wl,--save-temps
122 $> clang --target=amdgcn-amd-amdhsa -mcpu=gfx90a -nogpulib out.bc -o a.out
123 $> clang openmp.c -fopenmp --offload-arch=gfx90a -Wl,--override-image=openmp=a.out
129 ``-fembed-offload-object`` flag in Clang. Given an input file containing the
133 .. code-block:: console
135 clang-linker-wrapper --host-triple=x86_64 --linker-path=/usr/bin/ld -- <Args>