Lines Matching +full:fail +full:- +full:fast
13 runtime performance through whole-program analysis and cross-module
16 in time or memory, and also prevents fast incremental compiles.
22 locations for later cross-module function importing. Fast and efficient
23 whole-program analysis is then performed on the combined summary index.
29 as the distinction between the fast serial thin link step and the backends
34 <http://blog.llvm.org/2016/06/thinlto-scalable-and-incremental-lto.html>`_.
43 ----------
53 -------
59 - **gold (via the gold-plugin)**:
63 - **ld64**:
65 - **lld**:
72 -----
74 To utilize ThinLTO, simply add the -flto=thin option to compile and link. E.g.
76 .. code-block:: console
78 % clang -flto=thin -O2 file1.c file2.c -c
79 % clang -flto=thin -O2 file1.o file2.o -o a.out
81 When using lld-link, the -flto option need only be added to the compile step:
83 .. code-block:: console
85 % clang-cl -flto=thin -O2 -c file1.c file2.c
86 % lld-link /out:a.exe file1.obj file2.obj
91 non-LTO.
95 .. code-block:: console
100 was not built with ``-DLLVM_BINUTILS_INCDIR`` set properly. See
102 `LLVM gold plugin <https://llvm.org/docs/GoldPlugin.html#how-to-build-it>`_.
105 -------------------------------
112 For machines with hyper-threading, this is the total number of
117 - gold:
118 ``-Wl,-plugin-opt,jobs=N``
119 - ld64:
120 ``-Wl,-mllvm,-threads=N``
121 - ld.lld, ld64.lld:
122 ``-Wl,--thinlto-jobs=N``
123 - lld-link:
128 - 0:
130 - 1:
131 Use a single thread only (disable multi-threading)
132 - all:
133 Use one thread per logical core (uses all hyper-threads)
136 -----------
139 ThinLTO supports fast incremental builds through the use of a cache,
142 - gold (as of LLVM 4.0):
143 ``-Wl,-plugin-opt,cache-dir=/path/to/cache``
144 - ld64 (supported since clang 3.9 and Xcode 8) and Mach-O ld64.lld (as of LLVM
146 ``-Wl,-cache_path_lto,/path/to/cache``
147 - ELF ld.lld (as of LLVM 5.0):
148 ``-Wl,--thinlto-cache-dir=/path/to/cache``
149 - COFF lld-link (as of LLVM 6.0):
153 -------------
160 - gold (as of LLVM 6.0):
161 ``-Wl,-plugin-opt,cache-policy=POLICY``
162 - ELF ld.lld (as of LLVM 5.0), Mach-O ld64.lld (as of LLVM 15.0):
163 ``-Wl,--thinlto-cache-policy=POLICY``
164 - COFF lld-link (as of LLVM 6.0):
167 A policy string is a series of key-value pairs separated by ``:`` characters.
168 Possible key-value pairs are:
170 - ``cache_size=X%``: The maximum size for the cache directory is ``X`` percent
174 size-based pruning. The default is 75%.
176 - ``cache_size_bytes=X``, ``cache_size_bytes=Xk``, ``cache_size_bytes=Xm``,
181 the byte size-based pruning. The default is no byte size-based pruning.
183 Note that ThinLTO will apply both size-based pruning policies simultaneously,
188 - ``cache_size_files=X``:
192 - ``prune_after=Xs``, ``prune_after=Xm``, ``prune_after=Xh``: Sets the
195 it is removed from the cache. A value of 0 disables the expiration-based
198 - ``prune_interval=Xs``, ``prune_interval=Xm``, ``prune_interval=Xh``:
205 ---------------
207 To `bootstrap clang/LLVM <https://llvm.org/docs/AdvancedBuilds.html#bootstrap-builds>`_
214 <https://llvm.org/docs/CMake.html#options-and-variables>`_
217 * ``-DLLVM_ENABLE_LTO=Thin``
218 * ``-DCMAKE_C_COMPILER=/path/to/host/clang``
219 * ``-DCMAKE_CXX_COMPILER=/path/to/host/clang++``
220 * ``-DCMAKE_RANLIB=/path/to/host/llvm-ranlib``
221 * ``-DCMAKE_AR=/path/to/host/llvm-ar``
225 * ``-DLLVM_ENABLE_LTO=Thin``
226 * ``-DCMAKE_C_COMPILER=/path/to/host/clang-cl.exe``
227 * ``-DCMAKE_CXX_COMPILER=/path/to/host/clang-cl.exe``
228 * ``-DCMAKE_LINKER=/path/to/host/lld-link.exe``
229 * ``-DCMAKE_RANLIB=/path/to/host/llvm-ranlib.exe``
230 * ``-DCMAKE_AR=/path/to/host/llvm-ar.exe``
236 ``CMAKE_EXE_LINKER_FLAGS:STRING=``. Note the configure may fail if
248 <http://blog.llvm.org/2016/06/thinlto-scalable-and-incremental-lto.html>`_