Skip to content

Commit 2329ca1

Browse files
committed
Revert generating sources in make-snapshot
1 parent 01e4a82 commit 2329ca1

1 file changed

Lines changed: 0 additions & 30 deletions

File tree

tool/make-snapshot

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -501,36 +501,6 @@ touch-unicode-files:
501501
ENV["CACHE_SAVE"] = "no"
502502
make = MAKE.new(args)
503503
return unless make.run("update-download")
504-
# Build dump_ast for mk_builtin_loader.rb. CC=false in prereq.status
505-
# prevents make from compiling it, so we build it directly here.
506-
# Generate prism sources/headers from templates first, then compile.
507-
dump_ast = vars["DUMP_AST"]
508-
if dump_ast && !dump_ast.empty? && !File.exist?(dump_ast) && File.exist?("tool/dump_ast.c")
509-
prism_template = "prism/templates/template.rb"
510-
if File.exist?(prism_template)
511-
baseruby_cmd = baseruby.shellsplit
512-
Dir.glob("prism/templates/src/*.c.erb") do |erb|
513-
name = File.basename(erb, ".erb")
514-
out = "prism/#{name}"
515-
system(*baseruby_cmd, prism_template, "src/#{name}", out) unless File.exist?(out)
516-
end
517-
%w[include/prism/ast.h include/prism/internal/diagnostic.h].each do |hdr|
518-
out = "prism/#{hdr.delete_prefix("include/prism/")}"
519-
FileUtils.mkpath(File.dirname(out))
520-
system(*baseruby_cmd, prism_template, hdr, out) unless File.exist?(out)
521-
end
522-
end
523-
prism_srcs = Dir.glob("prism/*.c").reject {|f| %w[api_node extension].include?(File.basename(f, ".c"))}
524-
unless prism_srcs.empty?
525-
print "building dump_ast..."
526-
if system("cc", "-o", dump_ast, "-Iprism", "-I.", "tool/dump_ast.c", *prism_srcs)
527-
clean.add(dump_ast)
528-
puts $colorize.pass(" done")
529-
else
530-
puts $colorize.fail(" failed")
531-
end
532-
end
533-
end
534504
clean.push("rbconfig.rb", ".rbconfig.time", "enc.mk", "ext/ripper/y.output", ".revision.time")
535505
Dir.glob("**/*") do |dest|
536506
next unless File.symlink?(dest)

0 commit comments

Comments
 (0)