diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2016-05-02 15:16:15 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2016-05-03 15:15:27 -0700 |
| commit | f72bfe6661b35fd012fee100c673dafd1aec15f7 (patch) | |
| tree | 6ea314f4f4021214ade02b7d3bf28123d0d6ed8e /src/bootstrap/lib.rs | |
| parent | d80497e628945c3f11ff351030b4c62a8533e01e (diff) | |
| download | rust-f72bfe6661b35fd012fee100c673dafd1aec15f7.tar.gz rust-f72bfe6661b35fd012fee100c673dafd1aec15f7.zip | |
rustbuild: Document many more parts of the build
This commit expands the bootstrap build system's `README.md` as well as ensuring that all API documentation is present and up-to-date. Additionally a new `config.toml.example` file is checked in with commented out versions of all possible configuration values.
Diffstat (limited to 'src/bootstrap/lib.rs')
| -rw-r--r-- | src/bootstrap/lib.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index 3158a3ab058..ef6184d6ca7 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -8,10 +8,17 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +//! A small helper library shared between the build system's executables +//! +//! Currently this just has some simple utilities for modifying the dynamic +//! library lookup path. + use std::env; use std::ffi::OsString; use std::path::PathBuf; +/// Returns the environment variable which the dynamic library lookup path +/// resides in for this platform. pub fn dylib_path_var() -> &'static str { if cfg!(target_os = "windows") { "PATH" @@ -22,6 +29,8 @@ pub fn dylib_path_var() -> &'static str { } } +/// Parses the `dylib_path_var()` environment variable, returning a list of +/// paths that are members of this lookup path. pub fn dylib_path() -> Vec<PathBuf> { env::split_paths(&env::var_os(dylib_path_var()).unwrap_or(OsString::new())) .collect() |
