45 lines · plain
1import("//clang/resource_dir.gni")2import("//clang/runtimes.gni")3 4if (current_cpu == "x86") {5 if (current_os == "android") {6 crt_current_target_arch = "i686"7 } else {8 crt_current_target_arch = "i386"9 }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"18} else {19 assert(false, "unimplemented current_cpu " + current_cpu)20}21 22if (clang_enable_per_target_runtime_dir) {23 crt_current_out_dir = runtimes_dir24 25 crt_current_target_suffix = ""26} else if (current_os == "linux" || current_os == "android") {27 crt_current_out_dir = "$clang_resource_dir/lib/linux"28 29 crt_current_target_suffix = "-$crt_current_target_arch"30 if (current_os == "android") {31 crt_current_target_suffix += "-android"32 }33} else if (current_os == "ios" || current_os == "mac") {34 crt_current_out_dir = "$clang_resource_dir/lib/darwin"35 crt_current_target_suffix = "-$crt_current_target_arch"36} else if (current_os == "baremetal") {37 crt_current_out_dir = "$clang_resource_dir/lib/baremetal"38 crt_current_target_suffix = "-$crt_current_target_arch"39} else if (current_os == "win") {40 crt_current_out_dir = "$clang_resource_dir/lib/windows"41 crt_current_target_suffix = "-$crt_current_target_arch"42} else {43 assert(false, "unimplemented current_os " + current_os)44}45