We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 28b9bcb + b219192 commit 2f8dcafCopy full SHA for 2f8dcaf
bin/ruby-build
@@ -730,8 +730,12 @@ fi
730
731
# Work around warnings building Ruby 2.0 on Clang 2.x:
732
# pass -Wno-error=shorten-64-to-32 if the compiler accepts it.
733
+#
734
+# When we set CFLAGS, Ruby won't apply its default flags, though. Since clang
735
+# builds 1.9.x and 2.x only, where -O3 is default, we can safely set that flag.
736
+# Ensure it's the first flag since later flags take precedence.
737
if "${CC:-cc}" -x c /dev/null -E -Wno-error=shorten-64-to-32 &>/dev/null; then
- RUBY_CFLAGS="$RUBY_CFLAGS -Wno-error=shorten-64-to-32"
738
+ RUBY_CFLAGS="-O3 -Wno-error=shorten-64-to-32 $RUBY_CFLAGS"
739
fi
740
741
if [ -z "$MAKE" ]; then
0 commit comments