|
29 | 29 | GRAAL_DIR = File.expand_path('../graal', TRUFFLERUBY_DIR)
|
30 | 30 | PROFILES_DIR = "#{TRUFFLERUBY_DIR}/profiles"
|
31 | 31 |
|
| 32 | +CACHE_EXTRA_DIR = File.expand_path('~/.mx/cache/truffleruby') |
| 33 | +FileUtils.mkdir_p(CACHE_EXTRA_DIR) |
| 34 | + |
32 | 35 | TRUFFLERUBY_GEM_TEST_PACK_VERSION = 'fe5cfa6d14ce50b154fafbc8551cb656d4a39d3d'
|
33 | 36 |
|
34 | 37 | JDEBUG = '--vm.agentlib:jdwp=transport=dt_socket,server=y,address=8000,suspend=y'
|
@@ -1841,14 +1844,13 @@ def install(name, *options)
|
1841 | 1844 | raise 'Installing JVMCI is only available on Linux and macOS currently' unless linux? || darwin?
|
1842 | 1845 |
|
1843 | 1846 | update, jvmci_version = jvmci_update_and_version
|
1844 |
| - dir = File.expand_path('..', TRUFFLERUBY_DIR) |
1845 | 1847 | java_home = begin
|
1846 |
| - dir_pattern = "#{dir}/openjdk1.8.0*#{jvmci_version}" |
| 1848 | + dir_pattern = "#{CACHE_EXTRA_DIR}/openjdk1.8.0*#{jvmci_version}" |
1847 | 1849 | if Dir[dir_pattern].empty?
|
1848 | 1850 | STDERR.puts download_message
|
1849 | 1851 | jvmci_releases = 'https://github.com/graalvm/graal-jvmci-8/releases/download'
|
1850 | 1852 | filename = "openjdk-8u#{update}-#{jvmci_version}-#{mx_os}-amd64.tar.gz"
|
1851 |
| - chdir(dir) do |
| 1853 | + chdir(CACHE_EXTRA_DIR) do |
1852 | 1854 | raw_sh 'curl', '-L', "#{jvmci_releases}/#{jvmci_version}/#{filename}", '-o', filename
|
1853 | 1855 | raw_sh 'tar', 'xf', filename
|
1854 | 1856 | end
|
@@ -1884,11 +1886,10 @@ def install(name, *options)
|
1884 | 1886 |
|
1885 | 1887 | eclipse_tar = eclipse_url.split('/').last
|
1886 | 1888 | eclipse_name = File.basename(eclipse_tar, '.tar.gz')
|
1887 |
| - eclipse_path = File.expand_path("../#{eclipse_name}/#{eclipse_exe}", TRUFFLERUBY_DIR) |
| 1889 | + eclipse_path = "#{CACHE_EXTRA_DIR}/#{eclipse_name}/#{eclipse_exe}" |
1888 | 1890 | return eclipse_path if File.exist?(eclipse_path)
|
1889 | 1891 |
|
1890 |
| - dir = File.expand_path('..', TRUFFLERUBY_DIR) |
1891 |
| - chdir(dir) do |
| 1892 | + chdir(CACHE_EXTRA_DIR) do |
1892 | 1893 | unless File.exist?(eclipse_tar)
|
1893 | 1894 | raw_sh 'curl', '-L', eclipse_url, '-o', eclipse_tar
|
1894 | 1895 | end
|
|
0 commit comments