Skip to content

Commit

Permalink
Add special case for armv5te-unknown-linux-uclibceabi
Browse files Browse the repository at this point in the history
Needs bytecodealliance/target-lexicon#68 to be merged and released
  • Loading branch information
Jake-Shadle committed Feb 12, 2021
1 parent 40db565 commit 1722d2e
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions tests/eval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,25 @@ impl Target {
// resolved in a satisfactory manner, not really concerned about
// the presence of this triple in most normal cases
use target_lexicon as tl;
if s == "avr-unknown-gnu-atmega328" {
tl::Triple {
match s {
"avr-unknown-gnu-atmega328" => tl::Triple {
architecture: tl::Architecture::Avr,
vendor: tl::Vendor::Unknown,
operating_system: tl::OperatingSystem::Unknown,
environment: tl::Environment::Unknown,
binary_format: tl::BinaryFormat::Unknown,
}
} else {
match s.parse() {
},
"armv5te-unknown-linux-uclibceabi" => tl::Triple {
architecture: tl::Architecture::Arm(tl::ArmArchitecture::Armv5te),
vendor: tl::Vendor::Unknown,
operating_system: tl::OperatingSystem::Linux,
environment: tl::Environment::Uclibc,
binary_format: tl::BinaryFormat::Unknown,
},
triple => match triple.parse() {
Ok(l) => l,
Err(e) => panic!("failed to parse '{}': {:?}", s, e),
}
Err(e) => panic!("failed to parse '{}': {:?}", triple, e),
},
}
},
}
Expand All @@ -51,8 +57,8 @@ macro_rules! tg_match {
let linfo = tg.matches(&$target.lexicon);
assert_eq!(
tinfo, linfo,
"{:#?} builtin didn't match lexicon {:#?}",
$target.builtin, $target.lexicon
"{:#?} builtin didn't match lexicon {:#?} for predicate {:#?}",
$target.builtin, $target.lexicon, tg,
);

return linfo;
Expand All @@ -75,8 +81,8 @@ macro_rules! tg_match {
let linfo = tg.matches(&$target.lexicon);
assert_eq!(
tinfo, linfo,
"{:#?} builtin didn't match lexicon {:#?}",
$target.builtin, $target.lexicon
"{:#?} builtin didn't match lexicon {:#?} for predicate {:#?}",
$target.builtin, $target.lexicon, tg,
);

return linfo;
Expand Down

0 comments on commit 1722d2e

Please sign in to comment.