|
| 1 | +From bd479113d38aa453cbad9d9f5ca9c5fc8903b0cf Mon Sep 17 00:00:00 2001 |
| 2 | +From: onur-ozkan < [email protected]> |
| 3 | +Date: Thu, 11 Apr 2024 14:57:10 +0300 |
| 4 | +Subject: [PATCH] correct the handling of `bootstrap-cache-path` option |
| 5 | + |
| 6 | +This change makes `build.bootstrap-cache-path` option to be configurable with |
| 7 | +`./configure` script, so it can be used like `./configure --bootstrap-cache-path=demo`. |
| 8 | + |
| 9 | +Signed-off-by: onur-ozkan < [email protected]> |
| 10 | +--- |
| 11 | + config.example.toml | 2 +- |
| 12 | + src/bootstrap/configure.py | 4 +++- |
| 13 | + 2 files changed, 4 insertions(+), 2 deletions(-) |
| 14 | + |
| 15 | +--- a/config.example.toml |
| 16 | ++++ b/config.example.toml |
| 17 | +@@ -302,7 +302,7 @@ |
| 18 | + |
| 19 | + # Set the bootstrap/download cache path. It is useful when building rust |
| 20 | + # repeatedly in a CI invironment. |
| 21 | +-# bootstrap-cache-path = /shared/cache |
| 22 | ++#bootstrap-cache-path = /path/to/shared/cache |
| 23 | + |
| 24 | + # Enable a build of the extended Rust tool set which is not only the compiler |
| 25 | + # but also tools such as Cargo. This will also produce "combined installers" |
| 26 | +--- a/src/bootstrap/configure.py |
| 27 | ++++ b/src/bootstrap/configure.py |
| 28 | +@@ -152,9 +152,9 @@ v("default-linker", "rust.default-linker |
| 29 | + # (others are conditionally saved). |
| 30 | + o("manage-submodules", "build.submodules", "let the build manage the git submodules") |
| 31 | + o("full-bootstrap", "build.full-bootstrap", "build three compilers instead of two (not recommended except for testing reproducible builds)") |
| 32 | +-o("bootstrap-cache-path", "build.bootstrap-cache-path", "use provided path for the bootstrap cache") |
| 33 | + o("extended", "build.extended", "build an extended rust tool set") |
| 34 | + |
| 35 | ++v("bootstrap-cache-path", None, "use provided path for the bootstrap cache") |
| 36 | + v("tools", None, "List of extended tools will be installed") |
| 37 | + v("codegen-backends", None, "List of codegen backends to build") |
| 38 | + v("build", "build.build", "GNUs ./configure syntax LLVM build triple") |
| 39 | +@@ -359,6 +359,8 @@ def apply_args(known_args, option_checki |
| 40 | + set('target.{}.llvm-filecheck'.format(build_triple), value, config) |
| 41 | + elif option.name == 'tools': |
| 42 | + set('build.tools', value.split(','), config) |
| 43 | ++ elif option.name == 'bootstrap-cache-path': |
| 44 | ++ set('build.bootstrap-cache-path', value, config) |
| 45 | + elif option.name == 'codegen-backends': |
| 46 | + set('rust.codegen-backends', value.split(','), config) |
| 47 | + elif option.name == 'host': |
0 commit comments