1#![no_std]
39
40macro_rules! def_platforms {
42 (
43 $(
44 if $conds:meta {
45 mod $name:ident = $path:expr;
46 }
47 )*
48 ) => {
49 #[cfg(build_check_all)]
50 #[path="."]
51 mod build_all {
52 $(
53 #[path="."]
54 mod $name {
55 #[path=$path]
56 mod imp;
57
58 #[allow(dead_code)]
59 mod wrapper;
60 #[allow(dead_code)]
61 use self::wrapper::*;
62 }
63 )*
64 }
65
66 $(
67 #[cfg($conds)]
68 #[path=$path]
69 mod imp;
70 )*
71 }
72}
73
74def_platforms! {
75 if all(target_arch = "x86", target_family = "unix") {
77 mod x86_unix = "impl-cdecl32.rs";
78 }
79 if all(target_arch = "arm", target_family = "unix") {
81 mod arm_sysv = "impl-cdecl32.rs";
82 }
83
84 if all(
86 target_arch = "x86_64",
87 any(target_family = "unix", target_os = "redox", target_os = "tifflin")
88 ) {
89 mod x8664_elf = "impl-x86_64-elf.rs";
90 }
91 if all(any(target_arch = "x86_64", target_arch = "aarch64"), target_family = "windows") {
93 mod x8664_win64 = "impl-cdecl64.rs";
94 }
95
96 if all(
98 target_arch = "aarch64",
99 any(target_family = "unix", target_os = "redox"),
100 not(any(target_os = "macos", target_os = "ios")), ) {
102 mod aarch64_elf = "impl-aarch64-elf.rs";
103 }
104
105 if all(target_arch = "aarch64", any(target_os = "macos", target_os = "ios")) {
107 mod aarch64_macos = "impl-cdecl64.rs";
108 }
109}
110
111mod wrapper;
113pub use self::wrapper::*;
114