Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an alias for x86_64-sun-solaris target tuple #61761

Merged
merged 1 commit into from
Jun 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions src/librustc_target/spec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,16 +268,16 @@ pub type LinkArgs = BTreeMap<LinkerFlavor, Vec<String>>;
pub type TargetResult = Result<Target, String>;

macro_rules! supported_targets {
( $(($triple:expr, $module:ident),)+ ) => (
$(mod $module;)*
( $(($( $triple:literal, )+ $module:ident ),)+ ) => {
$(mod $module;)+

/// List of supported targets
const TARGETS: &[&str] = &[$($triple),*];
const TARGETS: &[&str] = &[$($($triple),+),+];

fn load_specific(target: &str) -> Result<Target, LoadTargetError> {
match target {
$(
$triple => {
$($triple)|+ => {
let mut t = $module::target()
.map_err(LoadTargetError::Other)?;
t.options.is_builtin = true;
Expand Down Expand Up @@ -307,7 +307,7 @@ macro_rules! supported_targets {
mod test_json_encode_decode {
use serialize::json::ToJson;
use super::Target;
$(use super::$module;)*
$(use super::$module;)+

$(
#[test]
Expand All @@ -322,9 +322,9 @@ macro_rules! supported_targets {
assert_eq!(original, parsed);
});
}
)*
)+
}
)
};
}

supported_targets! {
Expand Down Expand Up @@ -426,7 +426,9 @@ supported_targets! {
("armv7r-none-eabi", armv7r_none_eabi),
("armv7r-none-eabihf", armv7r_none_eabihf),

("x86_64-sun-solaris", x86_64_sun_solaris),
// `x86_64-pc-solaris` is an alias for `x86_64_sun_solaris` for backwards compatibility reasons.
// (See <https://github.com/rust-lang/rust/issues/40531>.)
("x86_64-sun-solaris", "x86_64-pc-solaris", x86_64_sun_solaris),
("sparcv9-sun-solaris", sparcv9_sun_solaris),

("x86_64-pc-windows-gnu", x86_64_pc_windows_gnu),
Expand Down
1 change: 1 addition & 0 deletions src/tools/build-manifest/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ static TARGETS: &[&str] = &[
"x86_64-pc-windows-msvc",
"x86_64-rumprun-netbsd",
"x86_64-sun-solaris",
"x86_64-pc-solaris",
"x86_64-unknown-cloudabi",
"x86_64-unknown-freebsd",
"x86_64-unknown-linux-gnu",
Expand Down