-
Notifications
You must be signed in to change notification settings - Fork 791
Restore -O3 default when we build with clang #351
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Restore -O3 default when we build with clang
😁 |
This is great! Could we please get a more recent |
+1 |
@sferik excellent, thanks! |
I just grabbed source and did a 2.0.0-p0 install, ran my test suite and it half a minute slower than it is on a manual install of 2.0.0-p0 |
@SamSaffron did you diagnose why? |
not yet ... need to read through the logs, which means I need to reinstall |
@SamSaffron you can check |
I am seeing: config.status: creating Makefile something that is probably not that good. where do I look up RbConfig::CONFIG['CFLAGS'] ? |
That's Ruby code 😁 On Sunday, May 5, 2013, Sam wrote:
|
Yeah my manual install has: irb(main):002:0> RbConfig::CONFIG['CFLAGS'] Brand new ruby-build install irb(main):004:0> RbConfig::CONFIG['CFLAGS'] maybe related to me running autoconf prior to configuring local when I did it manually ? |
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 withRUBY_CFLAGS="-Os" ...