Add a REQUIRES_FRAME_POINTER option to disable the frame pointer
authorNicolas Geoffray <nicolas.geoffray@lip6.fr>
Wed, 19 Aug 2009 22:04:44 +0000 (22:04 +0000)
committerNicolas Geoffray <nicolas.geoffray@lip6.fr>
Wed, 19 Aug 2009 22:04:44 +0000 (22:04 +0000)
elimination optimization on the LLVM code base.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79477 91177308-0d34-0410-b5e6-96231b3b80d8

Makefile.rules

index 8cc6558dcb6dfeee3a47dc3a1bef04a27cafc259..5556684d5b7e43fa4fc8b5fdc083502c7f275eb1 100644 (file)
@@ -337,6 +337,12 @@ ifndef REQUIRES_EH
   CXX.Flags += -fno-exceptions
 endif
 
+ifdef REQUIRES_FRAME_POINTER
+  CXX.Flags := $(filter-out -fomit-frame-pointer,$(CXX.Flags))
+  C.Flags   := $(filter-out -fomit-frame-pointer,$(C.Flags))
+  LD.Flags  := $(filter-out -fomit-frame-pointer,$(LD.Flags))
+endif
+
 # IF REQUIRES_RTTI=1 is specified then don't disable run-time type id
 ifndef REQUIRES_RTTI
 #  CXX.Flags += -fno-rtti