blob: a027498865d328a0bf5b83879dee662826e29969 [file] [log] [blame]
Miao Wangc5ceb722020-02-10 15:02:41 -08001// Copyright (C) 2020 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
Bob Badour3424fb12021-02-12 14:43:37 -080015package {
16 default_applicable_licenses: ["external_pthreadpool_license"],
17}
18
19// Added automatically by a large-scale-change
20// See: http://go/android-license-faq
21license {
22 name: "external_pthreadpool_license",
23 visibility: [":__subpackages__"],
24 license_kinds: [
25 "SPDX-license-identifier-BSD",
26 ],
27 license_text: [
28 "LICENSE",
29 ],
30}
31
Miao Wangc5ceb722020-02-10 15:02:41 -080032cc_library_static {
33 name: "libpthreadpool",
34 export_include_dirs: ["include"],
35 vendor_available: true,
36 sdk_version: "current",
37 srcs: [
Haibo Huang50c19eb2020-05-01 18:45:14 -070038 "src/memory.c",
39 "src/portable-api.c",
40 "src/pthreads.c",
Miao Wangc5ceb722020-02-10 15:02:41 -080041 ],
42 cflags: [
Miao Wangc5ceb722020-02-10 15:02:41 -080043 "-O2",
44 "-Wno-deprecated-declarations",
45 "-Wno-missing-field-initializers",
Haibo Huang50c19eb2020-05-01 18:45:14 -070046 "-DPTHREADPOOL_USE_CPUINFO=1",
47 "-DPTHREADPOOL_USE_CONDVAR=1",
Miao Wangc5ceb722020-02-10 15:02:41 -080048 ],
Haibo Huang50c19eb2020-05-01 18:45:14 -070049 c_std: "gnu11",
Miao Wangc5ceb722020-02-10 15:02:41 -080050 header_libs: [
51 "fxdiv_headers",
52 ],
Haibo Huang50c19eb2020-05-01 18:45:14 -070053 shared_libs: [
54 "liblog",
55 ],
56 static_libs: [
57 "libcpuinfo",
58 "libclog",
59 ],
Miao Wangc5ceb722020-02-10 15:02:41 -080060}
61
62cc_test {
63 name: "PthreadPoolTests",
64 sdk_version: "current",
65 srcs: [
66 "test/pthreadpool.cc",
67 ],
68 cflags: [
69 "-Wno-unused-parameter",
70 "-Wno-missing-field-initializers",
71 ],
72 stl: "libc++_static",
Haibo Huang50c19eb2020-05-01 18:45:14 -070073 shared_libs: [
74 "liblog",
75 ],
Miao Wangc5ceb722020-02-10 15:02:41 -080076 static_libs: [
Haibo Huang50c19eb2020-05-01 18:45:14 -070077 "libclog",
78 "libcpuinfo",
Miao Wangc5ceb722020-02-10 15:02:41 -080079 "libgmock_ndk",
80 "libpthreadpool",
81 ],
82 test_suites: [
83 "general-tests",
84 ],
85}