sstephenson/ruby-build — pull request #351 by jeremy (2013-04-26 22:13:37+00:00)
Title: Restore -O3 default when we build with clang

When we set the `-Wno-error=shorten-64-to-32` cflags, Ruby says "oh, someone set cflags, I won't set any" and we lose its default `-O3`. That kills 1.9.3 and 2.0.0 perf.

Since clang can only build 1.9/2.0, we can safely assume that if we're adding the `-Wno-error` flag, we should also provide `-O3` (`-O2` is default for 1.8).

We set `-O3` first since later `-O` options take precedence, so you can override with `RUBY_CFLAGS="-Os" ...`