Skip to content

Commit

Permalink
Fix target_link_options in pgosupport.cmake (#93670)
Browse files Browse the repository at this point in the history
  • Loading branch information
akoeplinger authored Oct 18, 2023
1 parent aa4d5f9 commit fa0ba15
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/coreclr/pgosupport.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ endif(NOT WIN32)
function(add_pgo TargetName)
if(CLR_CMAKE_PGO_INSTRUMENT)
if(CLR_CMAKE_HOST_WIN32)
target_link_options(${TargetName} $<$<AND:$<NOT:$<LINK_LANGUAGE:RC>>,$<CONFIG:RELEASE,RELWITHDEBINFO>>:/LTCG>)
target_link_options(${TargetName} $<$<CONFIG:RELEASE,RELWITHDEBINFO>:/GENPROFILE>)
target_link_options(${TargetName} PRIVATE $<$<AND:$<NOT:$<LINK_LANGUAGE:RC>>,$<CONFIG:RELEASE,RELWITHDEBINFO>>:/LTCG>)
target_link_options(${TargetName} PRIVATE $<$<CONFIG:RELEASE,RELWITHDEBINFO>:/GENPROFILE>)
else(CLR_CMAKE_HOST_WIN32)
if(UPPERCASE_CMAKE_BUILD_TYPE STREQUAL RELEASE OR UPPERCASE_CMAKE_BUILD_TYPE STREQUAL RELWITHDEBINFO)
target_compile_options(${TargetName} PRIVATE -flto -fprofile-instr-generate)
Expand Down

0 comments on commit fa0ba15

Please sign in to comment.