1if (current_cpu == "x86") { 2 if (current_os == "linux") { 3 llvm_current_triple = "i386-unknown-linux-gnu" 4 } 5} else if (current_cpu == "x64") { 6 if (current_os == "freebsd") { 7 llvm_current_triple = "x86_64-unknown-freebsd" 8 } else if (current_os == "linux") { 9 llvm_current_triple = "x86_64-unknown-linux-gnu" 10 } else if (current_os == "ios" || current_os == "mac") { 11 llvm_current_triple = "x86_64-apple-darwin" 12 } else if (current_os == "win") { 13 llvm_current_triple = "x86_64-pc-windows-msvc" 14 } 15} else if (current_cpu == "arm") { 16 if (current_os == "android") { 17 llvm_current_triple = "arm-linux-androideabi29" 18 } 19} else if (current_cpu == "arm64") { 20 if (current_os == "android") { 21 llvm_current_triple = "aarch64-linux-android29" 22 } else if (current_os == "ios" || current_os == "mac") { 23 llvm_current_triple = "arm64-apple-darwin" 24 } 25} else if (current_cpu == "ppc64") { 26 if (current_os == "linux") { 27 llvm_current_triple = "powerpc64le-unknown-linux-gnu" 28 } 29} 30 31if (!defined(llvm_current_triple)) { 32 assert(false, "unimplemented cpu/os " + current_cpu + "/" + current_os) 33} 34 35declare_args() { 36 # The default target triple. 37 llvm_target_triple = llvm_current_triple 38} 39