1 import("//clang/resource_dir.gni")
2 import("//clang/runtimes.gni")
4 if (current_cpu == "x86") {
5 if (current_os == "android") {
6 crt_current_target_arch = "i686"
8 crt_current_target_arch = "i386"
10 } else if (current_cpu == "x64") {
11 crt_current_target_arch = "x86_64"
12 } else if (current_cpu == "arm") {
13 crt_current_target_arch = "arm"
14 } else if (current_cpu == "arm64") {
15 crt_current_target_arch = "aarch64"
16 } else if (current_cpu == "ppc64") {
17 crt_current_target_arch = "powerpc64le"
19 assert(false, "unimplemented current_cpu " + current_cpu)
22 if (clang_enable_per_target_runtime_dir) {
23 crt_current_out_dir = runtimes_dir
25 crt_current_target_suffix = ""
26 } else if (current_os == "linux" || current_os == "android") {
27 crt_current_out_dir = "$clang_resource_dir/lib/linux"
29 crt_current_target_suffix = "-$crt_current_target_arch"
30 if (current_os == "android") {
31 crt_current_target_suffix += "-android"
33 } else if (current_os == "ios" || current_os == "mac") {
34 crt_current_out_dir = "$clang_resource_dir/lib/darwin"
35 } else if (current_os == "baremetal") {
36 crt_current_out_dir = "$clang_resource_dir/lib/baremetal"
37 crt_current_target_suffix = "-$crt_current_target_arch"
38 } else if (current_os == "win") {
39 crt_current_out_dir = "$clang_resource_dir/lib/windows"
40 crt_current_target_suffix = "-$crt_current_target_arch"
42 assert(false, "unimplemented current_os " + current_os)