Skip to content

Commit

Permalink
Feature detection for -Wno-error=shorten-64-to-32
Browse files Browse the repository at this point in the history
  • Loading branch information
sstephenson committed Feb 27, 2013
1 parent e75dcd0 commit 06d7994
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bin/ruby-build
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,11 @@ else
fi

# Work around warnings building Ruby 2.0 on Clang 2.x
RUBY_CFLAGS="$RUBY_CFLAGS -Wno-error=shorten-64-to-32"
if type clang &>/dev/null; then
if "${CC:-clang}" -x c /dev/null -E -Wno-error=shorten-64-to-32 &>/dev/null; then
RUBY_CFLAGS="$RUBY_CFLAGS -Wno-error=shorten-64-to-32"
fi
fi

if [ -z "$MAKE" ]; then
export MAKE="make"
Expand Down

0 comments on commit 06d7994

Please sign in to comment.