diff options
| author | Charlie Sharpsteen | 2011-05-24 18:15:05 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2011-05-26 07:53:06 -0700 |
| commit | c38d6f6195e9ebba062424a5203136faa87d9ba5 (patch) | |
| tree | 991cb76bce5c6e5365a3bc1fd7d41c38d15fb7ea /Library | |
| parent | d9ac399e3debb5438845892ec86b197faecc95fe (diff) | |
| download | homebrew-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.rb | 5 |
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' |
