diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs index 9c536111811..28ff14ab30f 100644 --- a/src/bootstrap/config.rs +++ b/src/bootstrap/config.rs @@ -100,6 +100,7 @@ pub struct Config { pub musl_root: Option, pub prefix: Option, pub docdir: Option, + pub bindir: Option, pub libdir: Option, pub libdir_relative: Option, pub mandir: Option, @@ -165,9 +166,10 @@ struct Build { #[derive(RustcDecodable, Default, Clone)] struct Install { prefix: Option, - mandir: Option, docdir: Option, + bindir: Option, libdir: Option, + mandir: Option, } /// TOML representation of how the LLVM build is configured. @@ -315,9 +317,10 @@ impl Config { if let Some(ref install) = toml.install { config.prefix = install.prefix.clone().map(PathBuf::from); - config.mandir = install.mandir.clone().map(PathBuf::from); config.docdir = install.docdir.clone().map(PathBuf::from); + config.bindir = install.bindir.clone().map(PathBuf::from); config.libdir = install.libdir.clone().map(PathBuf::from); + config.mandir = install.mandir.clone().map(PathBuf::from); } if let Some(ref llvm) = toml.llvm { @@ -526,6 +529,9 @@ impl Config { "CFG_DOCDIR" => { self.docdir = Some(PathBuf::from(value)); } + "CFG_BINDIR" => { + self.bindir = Some(PathBuf::from(value)); + } "CFG_LIBDIR" => { self.libdir = Some(PathBuf::from(value)); } diff --git a/src/bootstrap/config.toml.example b/src/bootstrap/config.toml.example index 25da976a555..57cafbaf280 100644 --- a/src/bootstrap/config.toml.example +++ b/src/bootstrap/config.toml.example @@ -160,15 +160,18 @@ # Instead of installing to /usr/local, install to this path instead. #prefix = "/usr/local" +# Where to install documentation in `prefix` above +#docdir = "share/doc/rust" + +# Where to install binaries in `prefix` above +#bindir = "bin" + # Where to install libraries in `prefix` above #libdir = "lib" # Where to install man pages in `prefix` above #mandir = "share/man" -# Where to install documentation in `prefix` above -#docdir = "share/doc/rust" - # ============================================================================= # Options for compiling Rust code itself # =============================================================================