Introduce crt_static target option in config.toml

This controls the value of the crt-static feature used when building the
standard library for a target, as well as the compiler itself when that
target is the host.
This commit is contained in:
Samuel Holland
2017-08-22 16:24:29 -05:00
parent 0c7a0e9851
commit 4b09dc6e39
5 changed files with 28 additions and 0 deletions

View File

@@ -656,6 +656,12 @@ impl Build {
base
}
/// Returns if this target should statically link the C runtime, if specified
fn crt_static(&self, target: Interned<String>) -> Option<bool> {
self.config.target_config.get(&target)
.and_then(|t| t.crt_static)
}
/// Returns the "musl root" for this `target`, if defined
fn musl_root(&self, target: Interned<String>) -> Option<&Path> {
self.config.target_config.get(&target)