mirror of
https://github.com/rbenv/ruby-build.git
synced 2025-09-17 14:41:26 +02:00
Don't auto-enable YJIT except on x86_64
This commit is contained in:
parent
807a371a3e
commit
7a07add472
1 changed files with 8 additions and 3 deletions
|
@ -1257,7 +1257,7 @@ build_package_ldflags_dirs() {
|
||||||
}
|
}
|
||||||
|
|
||||||
build_package_enable_yjit() {
|
build_package_enable_yjit() {
|
||||||
local rustc_installed rustc_ver
|
local rustc_installed x86_arch rustc_ver
|
||||||
|
|
||||||
rustc_installed=""
|
rustc_installed=""
|
||||||
if type -p rustc &>/dev/null; then
|
if type -p rustc &>/dev/null; then
|
||||||
|
@ -1268,8 +1268,13 @@ build_package_enable_yjit() {
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If YJIT is explicitly specified, don't change anything
|
x86_arch=""
|
||||||
if [[ " ${RUBY_CONFIGURE_OPTS} " != *" --enable-yjit"* ]] && [[ " ${RUBY_CONFIGURE_OPTS} " != *" --disable-yjit"* ]]; then
|
if [[ "$(uname -m)" == "x86_64" ]]; then
|
||||||
|
x86_arch="1"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If YJIT is explicitly specified or we're not on x86_64, don't change anything
|
||||||
|
if [[ "${x86_arch}" == "1" ]] && [[ " ${RUBY_CONFIGURE_OPTS} " != *" --enable-yjit"* ]] && [[ " ${RUBY_CONFIGURE_OPTS} " != *" --disable-yjit"* ]]; then
|
||||||
if [[ "${rustc_installed}" == "1" ]]; then
|
if [[ "${rustc_installed}" == "1" ]]; then
|
||||||
echo "Building with YJIT by default because ${rustc_ver} is installed; add RUBY_CONFIGURE_OPTS='--disable-yjit' to disable explicitly"
|
echo "Building with YJIT by default because ${rustc_ver} is installed; add RUBY_CONFIGURE_OPTS='--disable-yjit' to disable explicitly"
|
||||||
package_option ruby configure --enable-yjit
|
package_option ruby configure --enable-yjit
|
||||||
|
|
Loading…
Reference in a new issue