fn bin_subdir(arch: &str) -> Vec<(&'static str, &'static str)> {
        match (arch, host_arch()) {
            ("x86", Some(Arch::X86)) => vec![("", "")],
            ("x86", Some(Arch::Amd64)) => vec![("amd64_x86", "amd64"), ("", "")],
            ("x86_64", Some(Arch::X86)) => vec![("x86_amd64", "")],
            ("x86_64", Some(Arch::Amd64)) => vec![("amd64", "amd64"), ("x86_amd64", "")],
            ("arm", Some(Arch::X86)) => vec![("x86_arm", "")],
            ("arm", Some(Arch::Amd64)) => vec![("amd64_arm", "amd64"), ("x86_arm", "")],
            _ => vec![],
        }
    }
// When choosing the linker toolchain to use, we have to choose the one
// which matches the host architecture. Otherwise we end up in situations
// where someone on 32-bit Windows is trying to cross compile to 64-bit and
// it tries to invoke the native 64-bit linker which won't work.
//
// For the return value of this function, the first member of the tuple is
// the folder of the linker we will be invoking, while the second member
// is the folder of the host toolchain for that linker which is essential
// when using a cross linker. We return a Vec since on x64 there are often
// two linkers that can target the architecture we desire. The 64-bit host
// linker is preferred, and hence first, due to 64-bit allowing it more
// address space to work with and potentially being faster.
//
// FIXME - Figure out what happens when the host architecture is arm.
When choosing the linker toolchain to use, we have to choose the one
which matches the host architecture. Otherwise we end up in situations
where someone on 32-bit Windows is trying to cross compile to 64-bit and
it tries to invoke the native 64-bit linker which won't work.

For the return value of this function, the first member of the tuple is
the folder of the linker we will be invoking, while the second member
is the folder of the host toolchain for that linker which is essential
when using a cross linker. We return a Vec since on x64 there are often
two linkers that can target the architecture we desire. The 64-bit host
linker is preferred, and hence first, due to 64-bit allowing it more
address space to work with and potentially being faster.

Figure out what happens when the host architecture is arm.
When choosing the linker toolchain to use we have to choose the one which matches the host architecture . Otherwise we end up in situations where someone on 32 - bit Windows is trying to cross compile to 64 - bit and it tries to invoke the native 64 - bit linker which won ' t work . For the return value of this function the first member of the tuple is the folder of the linker we will be invoking while the second member is the folder of the host toolchain for that linker which is essential when using a cross linker . We return a Vec since on x64 there are often two linkers that can target the architecture we desire . The 64 - bit host linker is preferred and hence first due to 64 - bit allowing it more address space to work with and potentially being faster . Figure out what happens when the host architecture is arm .
fn bin_subdir(arch: &str) -> Vec<(&'static str, &'static str)> {
        match (arch, host_arch()) {
            ("x86", Some(Arch::X86)) => vec![("", "")],
            ("x86", Some(Arch::Amd64)) => vec![("amd64_x86", "amd64"), ("", "")],
            ("x86_64", Some(Arch::X86)) => vec![("x86_amd64", "")],
            ("x86_64", Some(Arch::Amd64)) => vec![("amd64", "amd64"), ("x86_amd64", "")],
            ("arm", Some(Arch::X86)) => vec![("x86_arm", "")],
            ("arm", Some(Arch::Amd64)) => vec![("amd64_arm", "amd64"), ("x86_arm", "")],
            _ => vec![],
        }
    }
fn bin_subdir ( arch : & str ) -> Vec < ( & ' static str , & ' static str ) > { match ( arch , host_arch ( ) ) { ( " " , Some ( Arch :: X86 ) ) => vec ! [ ( " " " " ) ] , ( " " , Some ( Arch :: Amd64 ) ) => vec ! [ ( " " " " ) ( " " " " ) ] , ( " " , Some ( Arch :: X86 ) ) => vec ! [ ( " " " " ) ] , ( " " , Some ( Arch :: Amd64 ) ) => vec ! [ ( " " " " ) ( " " " " ) ] , ( " " , Some ( Arch :: X86 ) ) => vec ! [ ( " " " " ) ] , ( " " , Some ( Arch :: Amd64 ) ) => vec ! [ ( " " " " ) ( " " " " ) ] , _ => vec ! [ ] , } }
When choosing the linker toolchain to use, we have to choose the one
which matches the host architecture.
When choosing the linker toolchain to use we have to choose the one which matches the host architecture .
arch
&str
arch
&str