..

Hard linking files in the incremental compilation cache failed

编译一个基于Rust语言的工程,cargo run 出现了该警告。


背景

1、VMware 搭建 Rust 编译环境
2、通过共享文件夹,编译在Windows下的Rust代码

原因

The compiler heavily relies on hard-linking for managing the incremental compilation cache1, but hard links are not available on all file systems. The compiler will fall back to actually copying the files which is potentially much slower. We should try to make the compiler detect if hard-linking is not available and suggest to the user that they move the cache directory onto a file system that supports hard links2.

VMware 和 Windows 直接的文件件共享,是软连接。 而硬链接只能在文件之间创建3