[MIParser] Set RegClassOrRegBank during instruction parsing
[llvm-complete.git] / utils / gn / secondary / compiler-rt / lib / profile / BUILD.gn
blobab6ffe6a86ccd94520ec91a97c6ed1c7fef2e4ea
1 import("//compiler-rt/target.gni")
3 static_library("profile") {
4   output_dir = crt_current_out_dir
5   if (current_os == "mac") {
6     output_name = "clang_rt.profile_osx"
7   } else {
8     output_name = "clang_rt.profile$crt_current_target_suffix"
9   }
11   complete_static_lib = true
12   configs -= [ "//llvm/utils/gn/build:thin_archive" ]
14   cflags = []
15   if (target_os != "win") {
16     cflags = [
17       "-fPIC",
18       "-Wno-pedantic",
19     ]
20   } else {
21     # This appears to be a C-only warning banning the use of locals in
22     # aggregate initializers. All other compilers accept this, though.
23     #     nonstandard extension used : 'identifier' :
24     #     cannot be initialized using address of automatic variable
25     cflags += [ "/wd4221" ]
26   }
28   sources = [
29     "GCDAProfiling.c",
30     "InstrProfiling.c",
31     "InstrProfiling.h",
32     "InstrProfilingBuffer.c",
33     "InstrProfilingFile.c",
34     "InstrProfilingInternal.h",
35     "InstrProfilingMerge.c",
36     "InstrProfilingMergeFile.c",
37     "InstrProfilingNameVar.c",
38     "InstrProfilingPlatformDarwin.c",
39     "InstrProfilingPlatformFuchsia.c",
40     "InstrProfilingPlatformLinux.c",
41     "InstrProfilingPlatformOther.c",
42     "InstrProfilingPlatformWindows.c",
43     "InstrProfilingPort.h",
44     "InstrProfilingRuntime.cpp",
45     "InstrProfilingUtil.c",
46     "InstrProfilingUtil.h",
47     "InstrProfilingValue.c",
48     "InstrProfilingWriter.c",
49   ]
50   if (target_os == "win") {
51     sources += [
52       "WindowsMMap.c",
53       "WindowsMMap.h",
54     ]
55   }
57   if (target_os != "win") {
58     defines = [
59       "COMPILER_RT_TARGET_HAS_ATOMICS",
60       "COMPILER_RT_TARGET_HAS_FCNTL_LCK",
61       "COMPILER_RT_TARGET_HAS_UNAME",
62     ]
63   }