aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorCharlie Sharpsteen2011-05-24 18:15:05 -0700
committerAdam Vandenberg2011-05-26 07:53:06 -0700
commitc38d6f6195e9ebba062424a5203136faa87d9ba5 (patch)
tree991cb76bce5c6e5365a3bc1fd7d41c38d15fb7ea /Library
parentd9ac399e3debb5438845892ec86b197faecc95fe (diff)
downloadhomebrew-c38d6f6195e9ebba062424a5203136faa87d9ba5.tar.bz2
Add method to ENV for setting up a debug build
`ENV.Og` clears all optimization flags and adds `-g -O0`. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/extend/ENV.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/Library/Homebrew/extend/ENV.rb b/Library/Homebrew/extend/ENV.rb
index 790434d5d..0e6931e70 100644
--- a/Library/Homebrew/extend/ENV.rb
+++ b/Library/Homebrew/extend/ENV.rb
@@ -104,6 +104,11 @@ module HomebrewEnvExtension
remove_from_cflags(/-O./)
append_to_cflags '-Os'
end
+ def Og
+ # Sometimes you want a debug build
+ remove_from_cflags(/-O./)
+ append_to_cflags '-g -O0'
+ end
def gcc_4_0_1
self['CC'] = self['LD'] = '/usr/bin/gcc-4.0'