1import("//clang/resource_dir.gni") 2import("//clang/runtimes.gni") 3 4if (current_cpu == "x86") { 5 crt_current_target_arch = "i386" 6} else if (current_cpu == "x64") { 7 crt_current_target_arch = "x86_64" 8} else if (current_cpu == "arm") { 9 crt_current_target_arch = "arm" 10} else if (current_cpu == "arm64") { 11 crt_current_target_arch = "aarch64" 12} else if (current_cpu == "ppc64") { 13 crt_current_target_arch = "powerpc64le" 14} else { 15 assert(false, "unimplemented current_cpu " + current_cpu) 16} 17 18if (clang_enable_per_target_runtime_dir) { 19 crt_current_out_dir = runtimes_dir 20 21 crt_current_target_suffix = "" 22} else if (current_os == "linux" || current_os == "android") { 23 crt_current_out_dir = "$clang_resource_dir/lib/linux" 24 25 crt_current_target_suffix = "-$crt_current_target_arch" 26 if (current_os == "android") { 27 crt_current_target_suffix += "-android" 28 } 29} else if (current_os == "ios" || current_os == "mac") { 30 crt_current_out_dir = "$clang_resource_dir/lib/darwin" 31} else { 32 assert(false, "unimplemented current_os " + current_os) 33} 34