[MIParser] Set RegClassOrRegBank during instruction parsing
[llvm-complete.git] / utils / gn / secondary / compiler-rt / test / BUILD.gn
blob1ee30eeb6d92062dd25a53779e113bf5e26ed0ba
1 import("//compiler-rt/target.gni")
2 import("//compiler-rt/test/test.gni")
3 import("//llvm/triples.gni")
4 import("//llvm/utils/gn/build/libs/zlib/enable.gni")
5 import("//llvm/utils/gn/build/toolchain/compiler.gni")
6 import("//llvm/utils/gn/build/write_cmake_config.gni")
7 import("//llvm/version.gni")
9 write_cmake_config("lit_common_configured") {
10   input = "lit.common.configured.in"
11   output = "$target_gen_dir/lit.common.configured"
13   values = [
14     "LIT_SITE_CFG_IN_HEADER=## Autogenerated from $input, do not edit",
16     "COMPILER_RT_DEFAULT_TARGET_TRIPLE=$llvm_current_triple",
17     "COMPILER_RT_DEFAULT_TARGET_ARCH=$crt_current_target_arch",
19     "COMPILER_RT_TEST_COMPILER_CFLAGS=$target_flags_string",
20     "LLVM_BUILD_MODE=.",
21     "LLVM_MAIN_SRC_DIR=" + rebase_path("//llvm"),
22     "LLVM_BINARY_DIR=" + rebase_path(root_build_dir),
23     "COMPILER_RT_SOURCE_DIR=" + rebase_path("//compiler-rt"),
25     # This is only used by tsan to find the path to an instrumented libc++.
26     # Since we don't currently support running the tsan tests, leave it empty
27     # for now. Eventually it should probably be replaced with some mechanism
28     # where the libraries are found in a toolchain dir.
29     "COMPILER_RT_BINARY_DIR=",
31     # We don't currently support the multiarch runtime layout.
32     "LLVM_ENABLE_PER_TARGET_RUNTIME_DIR_PYBOOL=False",
34     "LLVM_TOOLS_DIR=" + rebase_path("$root_build_dir/bin"),
35     "LLVM_LIBRARY_OUTPUT_INTDIR=" + rebase_path("$root_build_dir/lib"),
37     "LLVM_LIBCXX_USED=0",
39     "GOLD_EXECUTABLE=ld",
40     "COMPILER_RT_RESOLVED_TEST_COMPILER=" +
41         rebase_path("$root_build_dir/bin/clang"),
42     "COMPILER_RT_TEST_COMPILER_ID=Clang",
43     "PYTHON_EXECUTABLE=$python_path",
44     "COMPILER_RT_DEBUG_PYBOOL=False",
45     "COMPILER_RT_INTERCEPT_LIBDISPATCH_PYBOOL=False",
46     "COMPILER_RT_RESOLVED_LIBRARY_OUTPUT_DIR=" +
47         rebase_path(crt_current_out_dir),
48     "COMPILER_RT_EMULATOR=",
49     "COMPILER_RT_ASAN_SHADOW_SCALE=",
50     "SANITIZER_CAN_USE_CXXABI_PYBOOL=True",
51     "COMPILER_RT_HAS_LLD_PYBOOL=True",
52     "COMPILER_RT_HAS_GWP_ASAN_PYBOOL=False",
53     "HAVE_RPC_XDR_H=0",
54     "ANDROID_NDK_VERSION=19",
55     "ANDROID_SERIAL_FOR_TESTING=$android_serial_for_testing",
56   ]
58   if (host_cpu == "x64") {
59     values += [ "HOST_ARCH=x86_64" ]
60   } else {
61     assert(false, "unimplemented host_cpu " + host_cpu)
62   }
64   if (host_os == "mac") {
65     values += [ "HOST_OS=Darwin" ]
66   } else if (host_os == "linux") {
67     values += [ "HOST_OS=Linux" ]
68   } else if (host_os == "win") {
69     values += [ "HOST_OS=Windows" ]
70   } else {
71     assert(false, "unsupported host_os " + host_os)
72   }
74   if (current_os != "win" || llvm_enable_dia_sdk) {
75     values += [ "CAN_SYMBOLIZE=1" ]
76   } else {
77     values += [ "CAN_SYMBOLIZE=0" ]
78   }
80   if (current_os == "android") {
81     values += [ "ANDROID_PYBOOL=True" ]
82   } else {
83     values += [ "ANDROID_PYBOOL=False" ]
84   }
86   if (llvm_enable_zlib) {
87     values += [ "HAVE_LIBZ=1" ]
88   } else {
89     values += [ "HAVE_LIBZ=0" ]
90   }