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

transform_mjit_header.rb: read/write in binmode

* tool/transform_mjit_header.rb: read and write as ASCII-8BIT to
  make single-byte-optimizable always.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2018-02-05 02:02:23 +00:00
parent 70ae83f8e1
commit 3f45bbfe0e

View file

@ -104,7 +104,7 @@ module MJITHeader
def self.write(code, out)
FileUtils.mkdir_p(File.dirname(out))
File.write("#{out}.new", code)
File.binwrite("#{out}.new", code)
FileUtils.mv("#{out}.new", out)
end
@ -119,7 +119,7 @@ if ARGV.size != 3
end
cc = ARGV[0]
code = File.read(ARGV[1]) # Current version of the header file.
code = File.binread(ARGV[1]) # Current version of the header file.
outfile = ARGV[2]
if cc =~ /\Acl(\z| |\.exe)/
cflags = '-DMJIT_HEADER -Zs'