mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 04:23:51 +00:00
Add info about LTO usage for Fortran; C++ projects can be linked as before
This commit is contained in:
parent
7c48baf132
commit
9d03627a17
@ -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(<TARGET> 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(<TARGET> 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(<TARGET> PUBLIC TracyClientF90)
|
||||
\end{lstlisting}
|
||||
|
||||
For using Link-Time optimizations (LTO), you also need to link with \texttt{TracyClient}:
|
||||
|
||||
\begin{lstlisting}
|
||||
target_link_libraries(<TARGET> PUBLIC TracyClient TracyClientF90)
|
||||
\end{lstlisting}
|
||||
\end{bclogo}
|
||||
|
||||
\paragraph{\texttt{tracy} module}
|
||||
|
Loading…
x
Reference in New Issue
Block a user