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 | |
| 15 | cc_library_static { |
| 16 | name: "libpthreadpool", |
| 17 | export_include_dirs: ["include"], |
| 18 | vendor_available: true, |
| 19 | sdk_version: "current", |
| 20 | srcs: [ |
| 21 | "src/threadpool-pthreads.c", |
| 22 | "src/threadpool-legacy.c", |
| 23 | ], |
| 24 | cflags: [ |
| 25 | "-std=gnu11", |
| 26 | "-O2", |
| 27 | "-Wno-deprecated-declarations", |
| 28 | "-Wno-missing-field-initializers", |
| 29 | ], |
| 30 | header_libs: [ |
| 31 | "fxdiv_headers", |
| 32 | ], |
| 33 | } |
| 34 | |
| 35 | cc_test { |
| 36 | name: "PthreadPoolTests", |
| 37 | sdk_version: "current", |
| 38 | srcs: [ |
| 39 | "test/pthreadpool.cc", |
| 40 | ], |
| 41 | cflags: [ |
| 42 | "-Wno-unused-parameter", |
| 43 | "-Wno-missing-field-initializers", |
| 44 | ], |
| 45 | stl: "libc++_static", |
| 46 | static_libs: [ |
| 47 | "libgmock_ndk", |
| 48 | "libpthreadpool", |
| 49 | ], |
| 50 | test_suites: [ |
| 51 | "general-tests", |
| 52 | ], |
| 53 | } |
| 54 | |