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>
This commit is contained in:
Charlie Sharpsteen 2011-05-24 18:15:05 -07:00 committed by Adam Vandenberg
parent 783be64cf1
commit 85d7d4e16c

View File

@ -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'