[lit] Improve lit.Run class
[llvm-complete.git] / utils / gn / secondary / compiler-rt / target.gni
blobc739acc656f8410174b59e152ff0e75628a80208
1 import("//clang/resource_dir.gni")
2 import("//clang/runtimes.gni")
4 if (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 == "arm64") {
9   crt_current_target_arch = "aarch64"
10 } else if (current_cpu == "ppc64") {
11   crt_current_target_arch = "powerpc64le"
12 } else {
13   assert(false, "unimplemented current_cpu " + current_cpu)
16 if (clang_enable_per_target_runtime_dir) {
17   crt_current_out_dir = runtimes_dir
19   crt_current_target_suffix = ""
20 } else if (current_os == "linux" || current_os == "android") {
21   crt_current_out_dir = "$clang_resource_dir/lib/linux"
23   crt_current_target_suffix = "-$crt_current_target_arch"
24   if (current_os == "android") {
25     crt_current_target_suffix += "-android"
26   }
27 } else if (current_os == "mac") {
28   crt_current_out_dir = "$clang_resource_dir/lib/darwin"
29 } else {
30   assert(false, "unimplemented current_os " + current_os)