diff --git a/manual/tracy.tex b/manual/tracy.tex index 185a21e0..58f1551e 100644 --- a/manual/tracy.tex +++ b/manual/tracy.tex @@ -441,7 +441,7 @@ You can integrate Tracy with CMake by adding the git submodule folder as a subdi \begin{lstlisting} # set options before add_subdirectory -# available options: TRACY_ENABLE, TRACY_ON_DEMAND, TRACY_NO_BROADCAST, TRACY_NO_CODE_TRANSFER, ... +# available options: TRACY_ENABLE, TRACY_LTO, TRACY_ON_DEMAND, TRACY_NO_BROADCAST, TRACY_NO_CODE_TRANSFER, ... option(TRACY_ENABLE "" ON) option(TRACY_ON_DEMAND "" ON) add_subdirectory(3rdparty/tracy) # target: TracyClient or alias Tracy::TracyClient @@ -2406,6 +2406,20 @@ Link \texttt{Tracy::TracyClientF90} to any target where you use Tracy for profil target_link_libraries( PUBLIC Tracy::TracyClientF90) \end{lstlisting} +For using Link-Time optimizations, link both \texttt{Tracy::TracyClient} and \texttt{Tracy::TracyClientF90} to any target where you use Tracy for profiling: + +\begin{lstlisting} +target_link_libraries( PUBLIC Tracy::TracyClient Tracy::TracyClientF90) +\end{lstlisting} + +\begin{bclogo}[ +noborder=true, +couleur=black!5, +logo=\bcbombe +]{Important} +The same compiler (vendor + version) must be used for LTO for \textbf{ALL} languages in project. +\end{bclogo} + \begin{bclogo}[ noborder=true, couleur=black!5, @@ -2434,6 +2448,12 @@ Then add this to any target where you use tracy for profiling: \begin{lstlisting} target_link_libraries( PUBLIC TracyClientF90) \end{lstlisting} + +For using Link-Time optimizations (LTO), you also need to link with \texttt{TracyClient}: + +\begin{lstlisting} +target_link_libraries( PUBLIC TracyClient TracyClientF90) +\end{lstlisting} \end{bclogo} \paragraph{\texttt{tracy} module}