Lines Matching +full:docs +full:- +full:lld +full:- +full:html

25   This document currently describes Clang configurations on POSIX-like
26 operating systems with the GCC-compatible ``clang`` driver. When
27 targeting Windows with the MSVC-compatible ``clang-cl`` driver, some
33 .. FIXME: Describe DWARF-related tools
41 The ``-E`` flag instructs Clang to stop after this step.
44 builds a source-level intermediate representation ("AST"), producing a
45 :ref:`precompiled header (PCH) <usersmanual-precompiled-headers>`,
49 The ``-precompile`` flag instructs Clang to stop after this step. This is
52 * **IR generation**: This converts the source-level intermediate representation
53 into an optimizer-specific intermediate representation (IR); for Clang, this
55 The ``-emit-llvm`` flag instructs Clang to stop after this step. If combined
56 with ``-S``, Clang will produce textual LLVM IR; otherwise, it will produce
60 into target-specific assembly code.
61 The ``-S`` flag instructs Clang to stop after this step.
63 * **Assembler**: This converts target-specific assembly code into
64 target-specific machine code object files.
65 The ``-c`` flag instructs Clang to stop after this step.
77 The Clang driver can be invoked with the ``-###`` flag (this argument will need
79 above steps, without running them. The ``-v`` (verbose) flag will print the
83 --------------
85 The Clang frontend (``clang -cc1``) is used to compile C family languages. The
86 command-line interface of the frontend is considered to be an implementation
91 --------------------------------------
93 Clang can be provided with inputs written in non-C-family languages. In such
95 currently-supported languages are:
97 * Ada (``-x ada``, ``.ad[bs]``)
98 * Fortran (``-x f95``, ``.f``, ``.f9[05]``, ``.for``, ``.fpp``, case-insensitive)
99 * Java (``-x java``)
104 ---------
106 Clang can either use LLVM's integrated assembler or an external system-specific
111 ``-fno-integrated-as`` option.
114 ------
120 * LLVM's `lld <https://lld.llvm.org>`_
123 Link-time optimization is natively supported by lld, and supported via
124 a `linker plugin <https://llvm.org/docs/GoldPlugin.html>`_ when using gold.
127 ``-fuse-ld=<linker name>`` flag.
135 target defaults or explicitly selected by the ``--rtlib=`` and ``--stdlib=``
138 The set of implicitly-linked libraries depend on the language mode. As a
148 .. FIXME: Describe Objective-C runtime libraries
153 ----------------
157 the underlying hardware (for instance, 128-bit integer multiplications),
160 The default runtime library is target-specific. For targets where GCC is
162 other targets, compiler-rt is used by default.
164 compiler-rt (LLVM)
167 `LLVM's compiler runtime library <https://compiler-rt.llvm.org/>`_ provides a
171 You can instruct Clang to use compiler-rt with the ``--rtlib=compiler-rt`` flag.
175 compiler-rt rather than libgcc_s by passing ``-DLIBCXX_USE_COMPILER_RT=YES``
176 and/or ``-DLIBCXXABI_USE_COMPILER_RT=YES`` to ``cmake``. Otherwise, you
183 `GCC's runtime library <https://gcc.gnu.org/onlinedocs/gccint/Libgcc.html>`_
184 can be used in place of compiler-rt. However, it lacks several functions
188 You can instruct Clang to use libgcc_s with the ``--rtlib=libgcc`` flag.
192 ---------------
201 compiler-rt (LLVM)
204 compiler-rt contains an implementation of an atomics library.
216 libgcc_s. You may need to manually add ``-latomic`` to support this
217 configuration when using non-native atomic operations (if you see link errors
221 --------------
224 the language-neutral stack unwinding portion of the Itanium C++ ABI
225 (`Level I <https://itanium-cxx-abi.github.io/cxx-abi/abi-eh.html#base-abi>`_).
232 LLVM's unwinder library is part of the llvm-project git repository. To
233 build it, pass ``-DLLVM_ENABLE_RUNTIMES=libunwind`` to the cmake invocation.
236 rather than libgcc_s by passing ``-DLIBCXXABI_USE_LLVM_UNWINDER=YES``
260 -----------------
262 The instrumentation added by Clang's sanitizers (``-fsanitize=...``) implicitly
268 compiler-rt, and the relevant portion of that library
270 will be implicitly linked when linking with a ``-fsanitize=...`` flag.
273 ------------------
280 ---------------
285 <https://itanium-cxx-abi.github.io/cxx-abi/abi.html>`_ and
287 <https://itanium-cxx-abi.github.io/cxx-abi/abi-eh.html#cxx-abi>`_.
316 linking libstdc++. You may need to manually add ``-lsupc++`` to support this
317 configuration when using ``-static`` or ``-static-libstdc++``.
326 --------------------
338 You can instruct Clang to use libc++ with the ``-stdlib=libc++`` flag.
345 4.8.3 (released 2014-05-22) and later. Historically Clang implemented
349 You can instruct Clang to use libstdc++ with the ``-stdlib=libstdc++`` flag.