• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// 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
15package {
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
32cc_library_static {
33    name: "libpthreadpool",
34    export_include_dirs: ["include"],
35    vendor_available: true,
36    sdk_version: "current",
37    srcs: [
38        "src/memory.c",
39        "src/portable-api.c",
40        "src/pthreads.c",
41    ],
42    cflags: [
43        "-O2",
44        "-Wno-deprecated-declarations",
45        "-Wno-missing-field-initializers",
46        "-DPTHREADPOOL_USE_CPUINFO=1",
47        "-DPTHREADPOOL_USE_CONDVAR=1",
48    ],
49    header_libs: [
50        "fxdiv_headers",
51    ],
52    shared_libs: [
53        "liblog",
54    ],
55    static_libs: [
56        "libcpuinfo",
57        "libclog",
58    ],
59}
60
61cc_test {
62    name: "PthreadPoolTests",
63    sdk_version: "current",
64    srcs: [
65        "test/pthreadpool.cc",
66    ],
67    cflags: [
68        "-Wno-unused-parameter",
69        "-Wno-missing-field-initializers",
70    ],
71    stl: "libc++_static",
72    shared_libs: [
73        "liblog",
74    ],
75    static_libs: [
76        "libclog",
77        "libcpuinfo",
78        "libgmock_ndk",
79        "libpthreadpool",
80    ],
81    test_suites: [
82        "general-tests",
83    ],
84}
85