[compiler-rt] r285204 - [ARM RT] Fix broken clear_cache debug build on ARM

Renato Golin via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 26 08:20:33 PDT 2016


Author: rengolin
Date: Wed Oct 26 10:20:33 2016
New Revision: 285204

URL: http://llvm.org/viewvc/llvm-project?rev=285204&view=rev
Log:
[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.

Modified:
    compiler-rt/trunk/lib/builtins/CMakeLists.txt

Modified: compiler-rt/trunk/lib/builtins/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/CMakeLists.txt?rev=285204&r1=285203&r2=285204&view=diff
==============================================================================
--- compiler-rt/trunk/lib/builtins/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/builtins/CMakeLists.txt Wed Oct 26 10:20:33 2016
@@ -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}




More information about the llvm-commits mailing list