1
Fork 0

Allow setting target_family to multiple values

This enables us to set more generic labels shared between targets. For
example `target_family="wasm"` across all targets that are conceptually
"wasm".

See https://github.com/rust-lang/reference/pull/1006
This commit is contained in:
Simonas Kazlauskas 2021-04-10 23:22:58 +03:00
parent 72c63de2cc
commit 4afea69090
18 changed files with 36 additions and 30 deletions

View file

@ -813,7 +813,7 @@ pub fn default_configuration(sess: &Session) -> CrateConfig {
ret.reserve(6); // the minimum number of insertions
// Target bindings.
ret.insert((sym::target_os, Some(Symbol::intern(os))));
if let Some(ref fam) = sess.target.os_family {
for fam in &sess.target.families {
ret.insert((sym::target_family, Some(Symbol::intern(fam))));
if fam == "windows" {
ret.insert((sym::windows, None));