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:
parent
72c63de2cc
commit
4afea69090
18 changed files with 36 additions and 30 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue