blob: 5bb999e20392416a2e152223302894178d10be06 [file] [log] [blame]
Christopher Ferriscbfcc162019-09-24 12:28:10 -07001//
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
17cc_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 Ferris7435ef72019-09-25 17:43:02 -070030 // This option speeds up alloc/free code paths by about 5% to 7%.
31 "-fno-stack-protector",
Christopher Ferriscbfcc162019-09-24 12:28:10 -070032
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 Ferriscbfcc162019-09-24 12:28:10 -070059 "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 Ferris3e5aef02019-09-25 20:15:25 -070087 header_libs: [
88 "bionic_libc_platform_headers",
Christopher Ferriscbfcc162019-09-24 12:28:10 -070089 ],
90}