| # 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() { |
| # 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 |
| } |
| |
| 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.") |