Miao Wang | c5ceb72 | 2020-02-10 15:02:41 -0800 | [diff] [blame] | 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 | |
Bob Badour | 3424fb1 | 2021-02-12 14:43:37 -0800 | [diff] [blame] | 15 | package { |
| 16 | default_applicable_licenses: ["external_pthreadpool_license"], |
| 17 | } |
| 18 | |
| 19 | // Added automatically by a large-scale-change |
| 20 | // See: http://go/android-license-faq |
| 21 | license { |
| 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 Wang | c5ceb72 | 2020-02-10 15:02:41 -0800 | [diff] [blame] | 32 | cc_library_static { |
| 33 | name: "libpthreadpool", |
| 34 | export_include_dirs: ["include"], |
| 35 | vendor_available: true, |
| 36 | sdk_version: "current", |
| 37 | srcs: [ |
Haibo Huang | 50c19eb | 2020-05-01 18:45:14 -0700 | [diff] [blame] | 38 | "src/memory.c", |
| 39 | "src/portable-api.c", |
| 40 | "src/pthreads.c", |
Miao Wang | c5ceb72 | 2020-02-10 15:02:41 -0800 | [diff] [blame] | 41 | ], |
| 42 | cflags: [ |
Miao Wang | c5ceb72 | 2020-02-10 15:02:41 -0800 | [diff] [blame] | 43 | "-O2", |
| 44 | "-Wno-deprecated-declarations", |
| 45 | "-Wno-missing-field-initializers", |
Haibo Huang | 50c19eb | 2020-05-01 18:45:14 -0700 | [diff] [blame] | 46 | "-DPTHREADPOOL_USE_CPUINFO=1", |
| 47 | "-DPTHREADPOOL_USE_CONDVAR=1", |
Miao Wang | c5ceb72 | 2020-02-10 15:02:41 -0800 | [diff] [blame] | 48 | ], |
Haibo Huang | 50c19eb | 2020-05-01 18:45:14 -0700 | [diff] [blame] | 49 | c_std: "gnu11", |
Miao Wang | c5ceb72 | 2020-02-10 15:02:41 -0800 | [diff] [blame] | 50 | header_libs: [ |
| 51 | "fxdiv_headers", |
| 52 | ], |
Haibo Huang | 50c19eb | 2020-05-01 18:45:14 -0700 | [diff] [blame] | 53 | shared_libs: [ |
| 54 | "liblog", |
| 55 | ], |
| 56 | static_libs: [ |
| 57 | "libcpuinfo", |
| 58 | "libclog", |
| 59 | ], |
Miao Wang | c5ceb72 | 2020-02-10 15:02:41 -0800 | [diff] [blame] | 60 | } |
| 61 | |
| 62 | cc_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 Huang | 50c19eb | 2020-05-01 18:45:14 -0700 | [diff] [blame] | 73 | shared_libs: [ |
| 74 | "liblog", |
| 75 | ], |
Miao Wang | c5ceb72 | 2020-02-10 15:02:41 -0800 | [diff] [blame] | 76 | static_libs: [ |
Haibo Huang | 50c19eb | 2020-05-01 18:45:14 -0700 | [diff] [blame] | 77 | "libclog", |
| 78 | "libcpuinfo", |
Miao Wang | c5ceb72 | 2020-02-10 15:02:41 -0800 | [diff] [blame] | 79 | "libgmock_ndk", |
| 80 | "libpthreadpool", |
| 81 | ], |
| 82 | test_suites: [ |
| 83 | "general-tests", |
| 84 | ], |
| 85 | } |