1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Ignore AppVeyor vs120's pdb corruption

We tried to fix this like https://github.com/ruby/ruby/pull/3029, but it
didn't work. The failure has never been helpful for developing MJIT, and
currently it's not prioritized to be fixed. Until we try to figure out
the root cause on AppVeyor vs120, let's optionally disable testing when
the random corruption happens.
This commit is contained in:
Takashi Kokubun 2020-04-13 23:08:24 -07:00
parent f883d6219e
commit 70b7304f03
No known key found for this signature in database
GPG key ID: 6FFC433B12EE23DD

View file

@ -57,6 +57,18 @@ module JITSupport
end && RbConfig::CONFIG["MJIT_SUPPORT"] != 'no' && !PENDING_RUBYCI_NICKNAMES.include?(ENV['RUBYCI_NICKNAME'])
end
# AppVeyor's Visual Studio 2013 is known to spuriously generate broken pch / pdb, like:
# error C2859: c:\projects\ruby\x64-mswin_120\include\ruby-2.8.0\x64-mswin64_120\rb_mjit_header-2.8.0.pdb
# is not the pdb file that was used when this precompiled header was created, recreate the precompiled header.
# https://ci.appveyor.com/project/ruby/ruby/builds/32159878/job/l2p38snw8yxxpp8h
#
# Until we figure out why, this allows us to skip testing JIT when it happens.
def vs120_pdb_corrupted?
return false unless ENV.key?('APPVEYOR') && RbConfig::CONFIG['MJIT_CC'].include?('Microsoft Visual Studio 12.0')
_stdout, stderr, status = eval_with_jit_without_retry('proc {}.call', verbose: 2, min_calls: 1)
!status.success? && stderr.include?('.pdb is not the pdb file that was used when this precompiled header was created, recreate the precompiled header.')
end
def remove_mjit_logs(stderr)
if RubyVM::MJIT.enabled? # utility for -DFORCE_MJIT_ENABLE
stderr.gsub(/^MJIT warning: Skipped to compile unsupported instruction: \w+\n/m, '')