Christopher Ferris | 9323b72 | 2017-03-03 17:43:14 -0800 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2017 The Android Open Source Project |
| 3 | // |
| 4 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | // you may not use this file except in compliance with the License. |
| 6 | // You may obtain a copy of the License at |
| 7 | // |
| 8 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | // |
| 10 | // Unless required by applicable law or agreed to in writing, software |
| 11 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | // See the License for the specific language governing permissions and |
| 14 | // limitations under the License. |
| 15 | // |
| 16 | |
| 17 | cc_defaults { |
| 18 | name: "libdemangle_defaults", |
| 19 | |
| 20 | host_supported: true, |
| 21 | |
| 22 | cflags: [ |
| 23 | "-Wall", |
| 24 | "-Werror", |
| 25 | "-Wextra", |
| 26 | ], |
| 27 | } |
| 28 | |
| 29 | cc_library { |
| 30 | name: "libdemangle", |
Martijn Coenen | dfcbcfd | 2017-06-07 14:50:55 -0700 | [diff] [blame^] | 31 | |
| 32 | vendor_available: true, |
| 33 | |
Christopher Ferris | 9323b72 | 2017-03-03 17:43:14 -0800 | [diff] [blame] | 34 | defaults: ["libdemangle_defaults"], |
| 35 | |
| 36 | srcs: [ |
| 37 | "Demangler.cpp", |
| 38 | ], |
| 39 | |
| 40 | local_include_dirs: [ |
| 41 | "include", |
| 42 | ], |
| 43 | |
| 44 | export_include_dirs: [ |
| 45 | "include", |
| 46 | ], |
| 47 | } |
| 48 | |
Christopher Ferris | a11dc8f | 2017-03-13 15:54:55 -0700 | [diff] [blame] | 49 | cc_binary { |
| 50 | name: "demangle", |
| 51 | defaults: ["libdemangle_defaults"], |
| 52 | srcs: ["demangle.cpp"], |
| 53 | host_supported: true, |
| 54 | |
| 55 | shared_libs: ["libdemangle"], |
| 56 | } |
| 57 | |
Christopher Ferris | 9323b72 | 2017-03-03 17:43:14 -0800 | [diff] [blame] | 58 | //------------------------------------------------------------------------- |
| 59 | // Unit Tests |
| 60 | //------------------------------------------------------------------------- |
| 61 | cc_test { |
| 62 | name: "libdemangle_test", |
| 63 | defaults: ["libdemangle_defaults"], |
| 64 | |
| 65 | srcs: [ |
| 66 | "DemangleTest.cpp", |
| 67 | ], |
| 68 | |
| 69 | cflags: [ |
| 70 | "-O0", |
| 71 | "-g", |
| 72 | ], |
| 73 | |
| 74 | shared_libs: [ |
| 75 | "libdemangle", |
| 76 | ], |
| 77 | } |