File: BUILD.gn

package info (click to toggle)
llvm-toolchain-14 1%3A14.0.6-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,496,180 kB
  • sloc: cpp: 5,593,972; ansic: 986,872; asm: 585,869; python: 184,223; objc: 72,530; lisp: 31,119; f90: 27,793; javascript: 9,780; pascal: 9,762; sh: 9,482; perl: 7,468; ml: 5,432; awk: 3,523; makefile: 2,538; xml: 953; cs: 573; fortran: 567
file content (68 lines) | stat: -rw-r--r-- 1,743 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import("//compiler-rt/target.gni")

static_library("profile") {
  output_dir = crt_current_out_dir
  if (current_os == "mac") {
    output_name = "clang_rt.profile_osx"
  } else {
    output_name = "clang_rt.profile$crt_current_target_suffix"
  }

  complete_static_lib = true
  configs -= [ "//llvm/utils/gn/build:thin_archive" ]

  cflags = []
  if (current_os != "win") {
    cflags = [
      "-fPIC",
      "-Wno-pedantic",
    ]
  } else {
    # This appears to be a C-only warning banning the use of locals in
    # aggregate initializers. All other compilers accept this, though.
    #     nonstandard extension used : 'identifier' :
    #     cannot be initialized using address of automatic variable
    cflags += [ "/wd4221" ]
  }

  include_dirs = [ "../../include" ]

  sources = [
    "GCDAProfiling.c",
    "InstrProfiling.c",
    "InstrProfiling.h",
    "InstrProfilingBuffer.c",
    "InstrProfilingFile.c",
    "InstrProfilingInternal.c",
    "InstrProfilingInternal.h",
    "InstrProfilingMerge.c",
    "InstrProfilingMergeFile.c",
    "InstrProfilingNameVar.c",
    "InstrProfilingPlatformDarwin.c",
    "InstrProfilingPlatformFuchsia.c",
    "InstrProfilingPlatformLinux.c",
    "InstrProfilingPlatformOther.c",
    "InstrProfilingPlatformWindows.c",
    "InstrProfilingPort.h",
    "InstrProfilingRuntime.cpp",
    "InstrProfilingUtil.c",
    "InstrProfilingUtil.h",
    "InstrProfilingValue.c",
    "InstrProfilingVersionVar.c",
    "InstrProfilingWriter.c",
  ]
  if (current_os == "win") {
    sources += [
      "WindowsMMap.c",
      "WindowsMMap.h",
    ]
  }

  if (current_os != "win") {
    defines = [
      "COMPILER_RT_HAS_UNAME",
      "COMPILER_RT_HAS_ATOMICS",
      "COMPILER_RT_HAS_FCNTL_LCK",
    ]
  }
}