forked from bazelbuild/rules_rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bazelbuild#1: Include details such as the target architecture in the cache folder hash. Previously only the path to rustc and the compilation mode was used to calculate the hash, and this was likely the cause of ICEs. We now include all of the env vars passed into the request in the hash, so that separate folders are created for different crate names, crate versions, and target architectures. bazelbuild#2: A new worker was previously being created for every rustc invocation, because the env parameter contained crate-specific details that caused WorkerKey to change each time. Instead of passing the environment in directly, persist it to a file, and pass it to process-wrapper with --env-file instead. We also use the contents of this file in order to generate the hash mentioned above. This will mean you'll be limited to 4 workers by default; you may want to also pass in --worker_max_instances=Rustc=HOST_CPUS*0.5 or similar, as JIT startup is not a concern for the Rust workers, and parts of rustc's compilation process are unable to take advantage of more than 1 CPU core. bazelbuild#3: Instead of storing incremental files in $TEMP, the worker is now enabled by providing it with a folder that it should store its incremental files in, such as: bazel build --@rules_rust//worker:cache_root=/path/to/cache/files This mimics the behaviour of --disk_cache and --repository_cache, and makes it clear where the files are being persisted to.
- Loading branch information
Showing
5 changed files
with
134 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters