File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -1218,13 +1218,17 @@ if (LLVM_BUILD_INSTRUMENTED)
12181218 CMAKE_SHARED_LINKER_FLAGS)
12191219 endif ()
12201220 elseif (uppercase_LLVM_BUILD_INSTRUMENTED STREQUAL "CSSPGO" )
1221- append ("-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fno-optimize-sibling-calls -fpseudo-probe-for-profiling"
1222- CMAKE_CXX_FLAGS
1223- CMAKE_C_FLAGS)
1224- if (NOT LINKER_IS_LLD_LINK)
1225- append ("-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fno-optimize-sibling-calls -fpseudo-probe-for-profiling"
1226- CMAKE_EXE_LINKER_FLAGS
1227- CMAKE_SHARED_LINKER_FLAGS)
1221+ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
1222+ append ("-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fno-optimize-sibling-calls -fpseudo-probe-for-profiling -fdebug-info-for-profiling"
1223+ CMAKE_CXX_FLAGS
1224+ CMAKE_C_FLAGS)
1225+ if (NOT LINKER_IS_LLD_LINK)
1226+ append ("-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fno-optimize-sibling-calls -fpseudo-probe-for-profiling -fdebug-info-for-profiling"
1227+ CMAKE_EXE_LINKER_FLAGS
1228+ CMAKE_SHARED_LINKER_FLAGS)
1229+ endif ()
1230+ else ()
1231+ message (FATAL_ERROR "LLVM_BUILD_INSTRUMENTED=CSSPGO can only be specified when compiling with clang" )
12281232 endif ()
12291233 else ()
12301234 append ("-fprofile-instr-generate=\" ${LLVM_PROFILE_FILE_PATTERN} \" "
You can’t perform that action at this time.
0 commit comments