Skip to content

When target_family is None, rustc sets it to unix. #38187

Closed
@parched

Description

@parched

See

let fam = if let Some(ref fam) = sess.target.target.options.target_family {
Symbol::intern(fam)
} else if sess.target.target.options.is_like_windows {
Symbol::intern("windows")
} else {
Symbol::intern("unix")
};

This is very unhelpful for bare-metal targets where there is no target family. Is there code that relies on it defaulting to unix if it is unspecified?

CC @arcnmx

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions