Skip to content

Commit 15ef82f

Browse files
committed
[GR-29847] Symlink instead of copying the built GraalVM
* This way, mx's LINKY_LAYOUT works. * Avoids an extra copy on disk. * This means the built GraalVM directory is changed e.g. by `gem install`. Any build with a changed file is still a new clean pristine GraalVM.
1 parent 310f055 commit 15ef82f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tool/jt.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2170,11 +2170,11 @@ def bootstrap_toolchain
21702170
dest_ruby = "#{dest}/#{language_dir(build_dir)}/ruby"
21712171
dest_bin = "#{dest_ruby}/bin"
21722172
FileUtils.rm_rf dest
2173-
FileUtils.cp_r build_dir, dest
2173+
File.symlink(build_dir, dest)
21742174

21752175
# Insert native wrapper around the bash launcher
21762176
# since nested shebang does not work on macOS when fish shell is used.
2177-
if darwin? && !truffleruby_native?
2177+
if darwin? && File.binread(truffleruby_launcher_path)[2] == '#!'
21782178
FileUtils.mv "#{dest_bin}/truffleruby", "#{dest_bin}/truffleruby.sh"
21792179
FileUtils.cp "#{TRUFFLERUBY_DIR}/tool/native_launcher_darwin", "#{dest_bin}/truffleruby"
21802180
end

0 commit comments

Comments
 (0)