diff options
author | Renato Golin <renato.golin@linaro.org> | 2016-10-26 15:20:33 +0000 |
---|---|---|
committer | Renato Golin <renato.golin@linaro.org> | 2016-10-26 15:20:33 +0000 |
commit | 96ea1686d9241e2d6d473d3aba9ac120f5ae0c2c (patch) | |
tree | 91d94ec45bf2339848244542700d1d25c1697f7a /lib/builtins/CMakeLists.txt | |
parent | 0d488c299a33fa248b9d471e10f0a0d5a7c444c6 (diff) |
[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.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@285204 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/builtins/CMakeLists.txt')
-rw-r--r-- | lib/builtins/CMakeLists.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/builtins/CMakeLists.txt b/lib/builtins/CMakeLists.txt index 9ea0ba0d7..25b77300f 100644 --- a/lib/builtins/CMakeLists.txt +++ b/lib/builtins/CMakeLists.txt @@ -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} |