From 291c38f0953c4aedec575c122f4c05d82f4d39b4 Mon Sep 17 00:00:00 2001 From: Jacob Heider Date: Thu, 4 Jan 2024 18:16:56 -0500 Subject: [PATCH] fix(ruby) closes #4696 --yjit in 3.1.0-dev fix [[maybe_unused]] build issues on linux --- projects/ruby-lang.org/package.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/projects/ruby-lang.org/package.yml b/projects/ruby-lang.org/package.yml index e9438d2c..6483030c 100644 --- a/projects/ruby-lang.org/package.yml +++ b/projects/ruby-lang.org/package.yml @@ -28,6 +28,12 @@ build: - ./configure $ARGS + # clang17 doesn't like [[maybe_unused]] on types + # fix cribbed from https://github.com/ruby/ruby/pull/4603/commits/fbdff085ef3c8a56e0a33404e8795879e3167549 + - run: sed -i -e 's/elif RBIMPL_HAS_C_ATTRIBUTE(maybe_unused)/elif RBIMPL_HAS_C_ATTRIBUTE(maybe_unused) \&\& (__STDC_VERSION__ >= 202000L)/' maybe_unused.h + if: linux + working-directory: include/ruby/internal/attr + - make --jobs {{hw.concurrency}} install # we provide these as `rubygems.org` @@ -99,8 +105,7 @@ test: # - echo 'puts 1' | irb # tests the libraries that come with Ruby can be utilized - - run: - ruby $FIXTURE + - run: ruby $FIXTURE fixture: content: | require 'date' @@ -108,8 +113,7 @@ test: extname: rb # tests the gems that come with Ruby can be utilized - - run: - ruby $FIXTURE + - run: ruby $FIXTURE fixture: content: | require 'matrix' @@ -121,9 +125,8 @@ test: puts "Determinant of the matrix: #{determinant}" extname: rb - - run: - ruby --yjit $FIXTURE - if: ^3 + - run: ruby --yjit $FIXTURE + if: ^3.1 fixture: content: | def fib(n)