| # Copyright 2024 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| declare_args() { |
| # Enable incremental rust compilation. Takes a path to the directory to use |
| # as the cache. |
| rust_incremental = "" |
| } |
| |
| declare_args() { |
| # Place lengthy rustdeps and externs (GN) into ninja response files. |
| # Response files are needed to get around command line length limitations. |
| # rustc support for response files (as needed in our GN build) was |
| # added with revision 'git_revision:dfe53afaebd817f334d8ef9dc75a5cd2562cf6e6'. |
| rustc_use_response_files = true |
| |
| # To avoid build nondeterminism due to extern search paths resolving |
| # to more than one path during a build, this option places every rlib |
| # into its own exclusive directory. This requires |
| # `rustc_use_response_file = true` due to the command-line bloat this causes. |
| rust_one_rlib_per_dir = true |
| |
| # Controls whether the build runs the depfile verifier |
| verify_depfile = true |
| |
| # Enables a rustc wrapper that detects timeouts and ICEs |
| # TODO(pineapple): enable by default when using rust_incremental after |
| # b/345596983 is resolved |
| ice_detection = false |
| |
| # A timeout to catch rustc hangs, expressed in seconds. A value of zero |
| # means no timeout |
| rustc_timeout = 0 |
| } |
| |
| assert( |
| !rust_one_rlib_per_dir || rustc_use_response_files, |
| "rust_one_rlib_per_dir requires rustc_use_response_files, due to command-line length limits.") |