diff options
| author | Pietro Albini <pietro.albini@ferrous-systems.com> | 2022-11-08 12:27:49 +0100 |
|---|---|---|
| committer | Pietro Albini <pietro.albini@ferrous-systems.com> | 2022-11-15 10:22:17 +0100 |
| commit | 17ee25d77550b771200d73533e3bcb2a9959122d (patch) | |
| tree | 568986a2cdcb5be0beac47793abb6645fdf677cc | |
| parent | 101e1822c3e54e63996c8aaa014d55716f3937eb (diff) | |
| download | rust-17ee25d77550b771200d73533e3bcb2a9959122d.tar.gz rust-17ee25d77550b771200d73533e3bcb2a9959122d.zip | |
add the build.reuse config option to choose the reuse binary
| -rw-r--r-- | config.toml.example | 7 | ||||
| -rw-r--r-- | src/bootstrap/config.rs | 3 | ||||
| -rw-r--r-- | src/bootstrap/sanity.rs | 7 |
3 files changed, 17 insertions, 0 deletions
diff --git a/config.toml.example b/config.toml.example index c94a27b12a3..ffc6a330b9f 100644 --- a/config.toml.example +++ b/config.toml.example @@ -255,6 +255,13 @@ changelog-seen = 2 # Defaults to the Python interpreter used to execute x.py #python = "python" +# The path to the REUSE executable to use. REUSE will be used to gather +# the licensing information of the codebase. +# +# If this is omitted, the cached licensing information present in the source +# tarball will have to be present. +#reuse = "reuse" + # Force Cargo to check that Cargo.lock describes the precise dependency # set that all the Cargo.toml files create, instead of updating it. #locked-deps = false diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs index af004aa5098..34b631c2bca 100644 --- a/src/bootstrap/config.rs +++ b/src/bootstrap/config.rs @@ -212,6 +212,7 @@ pub struct Config { pub npm: Option<PathBuf>, pub gdb: Option<PathBuf>, pub python: Option<PathBuf>, + pub reuse: Option<PathBuf>, pub cargo_native_static: bool, pub configure_args: Vec<String>, @@ -610,6 +611,7 @@ define_config! { nodejs: Option<String> = "nodejs", npm: Option<String> = "npm", python: Option<String> = "python", + reuse: Option<String> = "reuse", locked_deps: Option<bool> = "locked-deps", vendor: Option<bool> = "vendor", full_bootstrap: Option<bool> = "full-bootstrap", @@ -1003,6 +1005,7 @@ impl Config { config.npm = build.npm.map(PathBuf::from); config.gdb = build.gdb.map(PathBuf::from); config.python = build.python.map(PathBuf::from); + config.reuse = build.reuse.map(PathBuf::from); config.submodules = build.submodules; set(&mut config.low_priority, build.low_priority); set(&mut config.compiler_docs, build.compiler_docs); diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs index 631d42acb93..8a40b0f64f4 100644 --- a/src/bootstrap/sanity.rs +++ b/src/bootstrap/sanity.rs @@ -140,6 +140,13 @@ than building it. .map(|p| cmd_finder.must_have(p)) .or_else(|| cmd_finder.maybe_have("gdb")); + build.config.reuse = build + .config + .reuse + .take() + .map(|p| cmd_finder.must_have(p)) + .or_else(|| cmd_finder.maybe_have("reuse")); + // We're gonna build some custom C code here and there, host triples // also build some C++ shims for LLVM so we need a C++ compiler. for target in &build.targets { |
