forked from vsrinivas/fuchsia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUILD.gn
142 lines (128 loc) · 3.25 KB
/
BUILD.gn
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# Copyright 2019 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/unification/global_variables.gni")
config("headers") {
visibility = [
"./*",
"//zircon/system/ulib/c:*",
]
cflags = [
"-idirafter",
rebase_path("include", root_build_dir),
]
asmflags = cflags
}
group("musl_internal") {
visibility = [
"./*",
"//zircon/system/ulib/c/*",
"//zircon/third_party/scudo/*",
]
public_deps = [
"//src/zircon/lib/zircon",
"//zircon/system/ulib/processargs",
"//zircon/system/ulib/runtime",
"//zircon/system/ulib/zircon-internal",
]
public_configs = [
":headers",
":musl_internal.config",
]
}
group("musl_internal_testing") {
testonly = true
visibility = [
"./*",
"//zircon/system/ulib/c/*",
"//zircon/system/utest/libc:*",
]
public_deps = [ ":musl_internal" ]
}
config("musl_internal.config") {
visibility = [ ":musl_internal" ]
include_dirs = [
"src/internal",
"arch/${toolchain.cpu}",
]
defines = [ "_XOPEN_SOURCE=700" ]
# TODO(kulakowski): Clean up the junkier -Wno flags below.
cflags = [
"-Wno-sign-compare",
"-Wno-implicit-fallthrough",
]
cflags_c = [ "-Werror=incompatible-pointer-types" ]
if (!is_gcc) {
# Some of this code runs before the TLS area for the canary is set up.
# TODO(mcgrathr): Isolate this to exactly what code needs it.
cflags += [ "-fno-stack-protector" ]
}
# libfuzzer also uses libc internally, by removing the fuzzing
# instrumentation we avoid it adding noise to the fuzzing coverage.
# TODO(25073): Once a cleaner solution is found, remove this.
configs = [ "//build/config/zircon:no_fuzzer" ]
}
if (toolchain_variant.base == "//zircon/system/ulib/c:user.libc_$target_cpu") {
group("musl") {
visibility = [ "//zircon/system/ulib/c:*" ]
deps = [
"ldso",
"pthread",
"src/complex",
"src/conf",
"src/ctype",
"src/dirent",
"src/env",
"src/errno",
"src/exit",
"src/fcntl",
"src/fenv",
"src/internal",
"src/ipc",
"src/ldso",
"src/legacy",
"src/linux",
"src/locale",
"src/math",
"src/misc",
"src/mman",
"src/multibyte",
"src/network",
"src/passwd",
"src/prng",
"src/process",
"src/regex",
"src/sched",
"src/signal",
"src/stat",
"src/stdio",
"src/stdlib",
"src/string",
"src/temp",
"src/termios",
"src/thread",
"src/time",
"src/unistd",
"third_party/smoothsort",
"third_party/tre",
]
}
}
# We share just this internal header with fdio so it can implement
# getifaddrs re-using this address manipulation code.
source_set("getifaddrs-internal") {
visibility = [
"src/network:*",
"//sdk/lib/fdio:*",
"//sdk/lib/fdio:fdio_sdk_manifest",
"//sdk/lib/fdio:fdio_sdk_manifest_meta_copy",
]
sources = [ "src/network/getifaddrs.h" ]
public_configs = [ ":getifaddrs_include_dirs" ]
# TODO(fxb/58162): delete the below and fix compiler warnings
configs += [ "//build/config:Wno-conversion" ]
}
config("getifaddrs_include_dirs") {
visibility = [ ":*" ]
include_dirs = [ "." ]
}