[ARM RT] Fix broken clear_cache debug build on ARM

clear_cache is using R7 for the SVC call and that's the frame pointer in
GCC, which is only disabled on -O2/3, so Release builds finish, Debug don't.

Fixes PR30797.

llvm-svn: 285204
This commit is contained in:
Renato Golin 2016-10-26 15:20:33 +00:00
parent 39787bdcbb
commit 81e8b771d7
1 changed files with 6 additions and 0 deletions

View File

@ -452,6 +452,12 @@ else ()
endif ()
endforeach ()
# Needed for clear_cache on debug mode, due to r7's usage in inline asm.
# Release mode already sets it via -O2/3, Debug mode doesn't.
if (${arch} STREQUAL "armhf")
list(APPEND BUILTIN_CFLAGS -fomit-frame-pointer)
endif()
add_compiler_rt_runtime(clang_rt.builtins
STATIC
ARCHS ${arch}