Christopher Ferris | cbfcc16 | 2019-09-24 12:28:10 -0700 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2019 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_library_static { |
| 18 | name: "libscudo", |
| 19 | native_coverage: false, |
| 20 | recovery_available: true, |
| 21 | host_supported: true, |
| 22 | native_bridge_supported: true, |
| 23 | |
| 24 | rtti: false, |
| 25 | stl: "none", |
| 26 | |
| 27 | cflags: [ |
| 28 | "-O3", |
| 29 | "-fno-rtti", |
Christopher Ferris | 7435ef7 | 2019-09-25 17:43:02 -0700 | [diff] [blame] | 30 | // This option speeds up alloc/free code paths by about 5% to 7%. |
| 31 | "-fno-stack-protector", |
Christopher Ferris | cbfcc16 | 2019-09-24 12:28:10 -0700 | [diff] [blame] | 32 | |
| 33 | "-Wall", |
| 34 | "-Wextra", |
| 35 | "-Wunused", |
| 36 | "-Wno-unused-result", |
| 37 | |
| 38 | "-Werror=pointer-to-int-cast", |
| 39 | "-Werror=int-to-pointer-cast", |
| 40 | "-Werror=type-limits", |
| 41 | "-Werror", |
| 42 | |
| 43 | "-D_BIONIC=1", |
| 44 | ], |
| 45 | cppflags: [ |
| 46 | "-nostdinc++", |
| 47 | "-fno-exceptions", |
| 48 | ], |
| 49 | |
| 50 | system_shared_libs: [], |
| 51 | |
| 52 | srcs: [ |
| 53 | "standalone/checksum.cpp", |
| 54 | "standalone/common.cpp", |
| 55 | "standalone/flags.cpp", |
| 56 | "standalone/flags_parser.cpp", |
| 57 | "standalone/linux.cpp", |
| 58 | "standalone/report.cpp", |
Christopher Ferris | cbfcc16 | 2019-09-24 12:28:10 -0700 | [diff] [blame] | 59 | "standalone/string_utils.cpp", |
| 60 | "standalone/wrappers_c_bionic.cpp" |
| 61 | ], |
| 62 | arch: { |
| 63 | arm: { |
| 64 | cflags: ["-mcrc"], |
| 65 | srcs: ["standalone/crc32_hw.cpp"], |
| 66 | }, |
| 67 | arm64: { |
| 68 | cflags: ["-mcrc"], |
| 69 | srcs: ["standalone/crc32_hw.cpp"], |
| 70 | }, |
| 71 | x86_64: { |
| 72 | cflags: ["-msse4.2"], |
| 73 | srcs: ["standalone/crc32_hw.cpp"], |
| 74 | }, |
| 75 | x86: { |
| 76 | cflags: ["-msse4.2"], |
| 77 | srcs: ["standalone/crc32_hw.cpp"], |
| 78 | }, |
| 79 | }, |
| 80 | |
| 81 | target: { |
| 82 | linux_glibc: { |
| 83 | enabled: true, |
| 84 | }, |
| 85 | }, |
| 86 | |
Christopher Ferris | 3e5aef0 | 2019-09-25 20:15:25 -0700 | [diff] [blame] | 87 | header_libs: [ |
| 88 | "bionic_libc_platform_headers", |
Christopher Ferris | cbfcc16 | 2019-09-24 12:28:10 -0700 | [diff] [blame] | 89 | ], |
| 90 | } |