File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,13 @@ impl Sysroot {
4343 triple : & str ,
4444 backends : & [ CodegenBackend ] ,
4545 ) -> Result < Self , SysrootDownloadError > {
46- let cache_directory = cache_directory. join ( & sha) . join ( triple) ;
46+ // The structure of this directory is load-bearing.
47+ // We use the commit SHA as the top-level key, to have a quick way of estimating how many
48+ // toolchains have been installed in the cache directory.
49+ // We also use a nested directory below the target tuple, because rustc outputs weird things
50+ // when we query it with `--print sysroot` and its sysroot is located in a directory that
51+ // corresponds to a valid target name.
52+ let cache_directory = cache_directory. join ( & sha) . join ( triple) . join ( "toolchain" ) ;
4753 fs:: create_dir_all ( & cache_directory) . map_err ( |e| SysrootDownloadError :: IO ( e. into ( ) ) ) ?;
4854
4955 let download = SysrootDownload {
You can’t perform that action at this time.
0 commit comments