blob: 948bf40629521a427ed86bd625bbfbc362461b63 [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
15cc_library_static {
16 name: "libpthreadpool",
17 export_include_dirs: ["include"],
18 vendor_available: true,
19 sdk_version: "current",
20 srcs: [
Haibo Huang50c19eb2020-05-01 18:45:14 -070021 "src/memory.c",
22 "src/portable-api.c",
23 "src/pthreads.c",
Miao Wangc5ceb722020-02-10 15:02:41 -080024 ],
25 cflags: [
Miao Wangc5ceb722020-02-10 15:02:41 -080026 "-O2",
27 "-Wno-deprecated-declarations",
28 "-Wno-missing-field-initializers",
Haibo Huang50c19eb2020-05-01 18:45:14 -070029 "-DPTHREADPOOL_USE_CPUINFO=1",
30 "-DPTHREADPOOL_USE_CONDVAR=1",
Miao Wangc5ceb722020-02-10 15:02:41 -080031 ],
Haibo Huang50c19eb2020-05-01 18:45:14 -070032 c_std: "gnu11",
Miao Wangc5ceb722020-02-10 15:02:41 -080033 header_libs: [
34 "fxdiv_headers",
35 ],
Haibo Huang50c19eb2020-05-01 18:45:14 -070036 shared_libs: [
37 "liblog",
38 ],
39 static_libs: [
40 "libcpuinfo",
41 "libclog",
42 ],
Miao Wangc5ceb722020-02-10 15:02:41 -080043}
44
45cc_test {
46 name: "PthreadPoolTests",
47 sdk_version: "current",
48 srcs: [
49 "test/pthreadpool.cc",
50 ],
51 cflags: [
52 "-Wno-unused-parameter",
53 "-Wno-missing-field-initializers",
54 ],
55 stl: "libc++_static",
Haibo Huang50c19eb2020-05-01 18:45:14 -070056 shared_libs: [
57 "liblog",
58 ],
Miao Wangc5ceb722020-02-10 15:02:41 -080059 static_libs: [
Haibo Huang50c19eb2020-05-01 18:45:14 -070060 "libclog",
61 "libcpuinfo",
Miao Wangc5ceb722020-02-10 15:02:41 -080062 "libgmock_ndk",
63 "libpthreadpool",
64 ],
65 test_suites: [
66 "general-tests",
67 ],
68}
69