martine/ninja — pull request #286 by chisophugis (2012-04-30 15:25:29+00:00)
Title: Don't add `-g` to cflags if --debug wasn't passed

I was a bit freaked out when I saw my ninja binary was 1.8MB.

After a bit of investigation, it turns out that `-g` was being added to cflags unconditionally in `configure.py`. This two-line patch makes `-g` be added only if `--debug` is passed on the command line to `configure.py`, which I think is the intended behavior since its description is "enable debugging flags", which would seem to imply that they should otherwise be disabled.

A vanilla build of Ninja now generates a 152K binary.