forked from fmtlib/fmt
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathAndroid.bp
More file actions
141 lines (133 loc) · 4.02 KB
/
Copy pathAndroid.bp
File metadata and controls
141 lines (133 loc) · 4.02 KB
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
package {
default_applicable_licenses: ["external_fmtlib9_license"],
}
// Added automatically by a large-scale-change that took the approach of
// 'apply every license found to every target'. While this makes sure we respect
// every license restriction, it may not be entirely correct.
//
// e.g. GPL in an MIT project might only apply to the contrib/ directory.
//
// Please consider splitting the single license below into multiple licenses,
// taking care not to lose any license_kind information, and overriding the
// default license using the 'licenses: [...]' property on targets as needed.
//
// For unused files, consider creating a 'fileGroup' with "//visibility:private"
// to attach the license to, and including a comment whether the files may be
// used in the current project.
//
// large-scale-change included anything that looked like it might be a license
// text as a license_text. e.g. LICENSE, NOTICE, COPYING etc.
//
// Please consider removing redundant or irrelevant files from 'license_text:'.
// See: http://go/android-license-faq
license {
name: "external_fmtlib9_license",
visibility: [":__subpackages__"],
license_kinds: [
"SPDX-license-identifier-BSD",
"SPDX-license-identifier-CC0-1.0",
"SPDX-license-identifier-MIT",
"SPDX-license-identifier-PSF-2.0",
"legacy_unencumbered",
],
license_text: [
"LICENSE.rst",
"NOTICE",
],
}
cc_defaults {
name: "fmtlib9-non-test-defaults",
cflags: [
"-fno-exceptions",
// If built without exceptions, libfmt uses assert.
// The tests *require* exceptions, so we can't win here.
// (This is also why we have two cc_defaults in this file.)
// Unless proven to be a bad idea, let's at least have some run-time
// checking.
"-UNDEBUG",
],
srcs: ["src/format.cc"],
local_include_dirs: ["include"],
export_include_dirs: ["include"],
visibility: ["//visibility:public"],
min_sdk_version: "29",
}
cc_library_static {
name: "fmtlib9",
defaults: ["fmtlib9-non-test-defaults"],
vendor_available: true,
product_available: true,
ramdisk_available: true,
vendor_ramdisk_available: true,
recovery_available: true,
host_supported: true,
native_bridge_supported: true,
target: {
linux_bionic: {
enabled: true,
},
windows: {
enabled: true,
},
},
apex_available: [
"//apex_available:anyapex",
"//apex_available:platform",
],
}
cc_library_static {
name: "fmtlib9_ndk",
defaults: ["fmtlib9-non-test-defaults"],
sdk_version: "current",
stl: "c++_static",
}
cc_defaults {
name: "fmtlib9-test-defaults",
srcs: [
"src/format.cc",
"src/os.cc",
"test/gtest-extra.cc",
"test/util.cc",
],
local_include_dirs: ["include"],
host_supported: true,
test_suites: ["general-tests"],
// The tests require exceptions and RTTI.
cflags: ["-fexceptions"],
rtti: true,
// The usual "gtest *and* gmock, please" dance...
gtest: false,
include_dirs: [
"external/googletest/googlemock/include/gmock",
"external/googletest/googletest/include/gtest",
],
static_libs: [
"libgmock",
"libgtest",
"libgtest_main",
],
}
// Most of the fmtlib9 tests.
cc_test {
name: "fmtlib9_test",
defaults: ["fmtlib9-test-defaults"],
srcs: [
"test/chrono-test.cc",
"test/color-test.cc",
"test/core-test.cc",
"test/format-test.cc",
// Some of the os-test tests deliberately try to do bad things with
// file descriptors, but Android's fdsan won't let them.
// "test/os-test.cc",
"test/printf-test.cc",
"test/ranges-test.cc",
"test/scan-test.cc",
],
}
// This one needs to be separate because some of the test names overlap with
// other tests.
cc_test {
name: "fmtlib9_ostream_test",
defaults: ["fmtlib9-test-defaults"],
srcs: ["test/ostream-test.cc"],
}