[clang] [LinkerWrapper] Pass all files to the device linker (PR #97573)
Joseph Huber via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 22 15:45:35 PDT 2024
================
@@ -0,0 +1,64 @@
+====================
+Clang nvlink Wrapper
+====================
+
+.. contents::
+ :local:
+
+.. _clang-nvlink-wrapper:
+
+Introduction
+============
+
+This tools works as a wrapper around the NVIDIA ``nvlink`` linker. The purpose
+of this wrapper is to provide an interface similar to the ``ld.lld`` linker
+while still relying on NVIDIA's proprietary linker to produce the final output.
+Features include, static archive (.a) linking, LTO, and accepting files ending
+in ``.o`` without error.
+
+Usage
+=====
+
+This tool can be used with the following options. Any arguments not intended
+only for the linker wrapper will be forwarded to ``nvlink``.
+
+.. code-block:: console
+
+ OVERVIEW: A utility that wraps around the NVIDIA 'nvlink' linker.
+ This enables static linking and LTO handling for NVPTX targets.
+
+ USAGE: clang-nvlink-wrapper [options] <options to passed to nvlink>
+
+ OPTIONS:
+ --arch <value> Specify the 'sm_' name of the target architecture.
+ --cuda-path=<dir> Set the system CUDA path
+ --dry-run Print generated commands without running.
+ --feature <value> Specify the '+ptx' freature to use for LTO.
+ -g Specify that this was a debug compile.
+ -help-hidden Display all available options
+ -help Display available options (--help-hidden for more)
+ -L <dir> Add <dir> to the library search path
+ -l <libname> Search for library <libname>
+ -mllvm <arg> Arguments passed to LLVM, including Clang invocations, for which the '-mllvm' prefix is preserved. Use '-mllvm --help' for a list of options.
----------------
jhuber6 wrote:
Yep, can do that.
https://github.com/llvm/llvm-project/pull/97573
More information about the cfe-commits
mailing list