if (current_cpu == "x86") {
if (current_os == "linux") {
llvm_current_triple = "i386-unknown-linux-gnu"
} else if (current_os == "win") {
llvm_current_triple = "i386-pc-windows-msvc"
} else if (current_os == "android") {
llvm_current_triple = "i686-linux-android29"
}
} else if (current_cpu == "x64") {
if (current_os == "freebsd") {
llvm_current_triple = "x86_64-unknown-freebsd"
} else if (current_os == "linux") {
llvm_current_triple = "x86_64-unknown-linux-gnu"
} else if (current_os == "ios" || current_os == "mac") {
llvm_current_triple = "x86_64-apple-darwin"
} else if (current_os == "win") {
llvm_current_triple = "x86_64-pc-windows-msvc"
} else if (current_os == "android") {
llvm_current_triple = "x86_64-linux-android29"
}
} else if (current_cpu == "arm") {
if (current_os == "android") {
llvm_current_triple = "arm-linux-androideabi29"
}
} else if (current_cpu == "arm64") {
if (current_os == "android") {
llvm_current_triple = "aarch64-linux-android29"
} else if (current_os == "ios" || current_os == "mac") {
llvm_current_triple = "arm64-apple-darwin"
} else if (current_os == "baremetal") {
llvm_current_triple = "aarch64-elf"
} else if (current_os == "linux") {
llvm_current_triple = "aarch64-unknown-linux-gnu"
}
} else if (current_cpu == "ppc64") {
if (current_os == "linux") {
llvm_current_triple = "powerpc64le-unknown-linux-gnu"
}
}
if (!defined(llvm_current_triple)) {
assert(false, "unimplemented cpu/os " + current_cpu + "/" + current_os)
}
declare_args() {
# The default target triple.
llvm_target_triple = llvm_current_triple
}