1 // The target triplets have the form of 'arch-vendor-system'.
2 //
3 // When building for Linux (e.g. the 'system' part is
4 // 'linux-something'), replace the vendor with 'unknown'
5 // so that mapping to rust standard targets happens correctly.
convert_custom_linux_target(target: String) -> String6 fn convert_custom_linux_target(target: String) -> String {
7     let mut parts: Vec<&str> = target.split('-').collect();
8     let system = parts.get(2);
9     if system == Some(&"linux") {
10         parts[1] = "unknown";
11     };
12     parts.join("-")
13 }
14