targets: move target specs to spec/targets
Signed-off-by: David Wood <david@davidtw.co>
This commit is contained in:
parent
76aa83e3e1
commit
1af256fe8a
231 changed files with 26 additions and 26 deletions
|
@ -1408,14 +1408,16 @@ impl fmt::Display for StackProtector {
|
|||
|
||||
macro_rules! supported_targets {
|
||||
( $(($triple:literal, $module:ident),)+ ) => {
|
||||
$(mod $module;)+
|
||||
mod targets {
|
||||
$(pub(crate) mod $module;)+
|
||||
}
|
||||
|
||||
/// List of supported targets
|
||||
pub const TARGETS: &[&str] = &[$($triple),+];
|
||||
|
||||
fn load_builtin(target: &str) -> Option<Target> {
|
||||
let mut t = match target {
|
||||
$( $triple => $module::target(), )+
|
||||
$( $triple => targets::$module::target(), )+
|
||||
_ => return None,
|
||||
};
|
||||
t.is_builtin = true;
|
||||
|
@ -1431,7 +1433,7 @@ macro_rules! supported_targets {
|
|||
$(
|
||||
#[test] // `#[test]`
|
||||
fn $module() {
|
||||
tests_impl::test_target(super::$module::target());
|
||||
tests_impl::test_target(crate::spec::targets::$module::target());
|
||||
}
|
||||
)+
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue