blob: 4214d853f28ceef948438aeb6d7142b695bc91f2 [file] [log] [blame]
// Copyright (C) 2009 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
subdirs = [
"vts/performance",
]
cc_defaults {
name: "libhwbinder_defaults",
shared_libs: [
"libbase",
"liblog",
"libcutils",
"libutils",
],
export_shared_lib_headers: [
"libbase",
"libutils",
],
export_include_dirs: ["include"],
include_dirs: ["frameworks/native/include"],
vendor_available: true,
vndk: {
enabled: true,
support_system_process: true,
},
clang: true,
sanitize: {
misc_undefined: ["integer"],
},
srcs: [
"Binder.cpp",
"BpHwBinder.cpp",
"BufferedTextOutput.cpp",
"Debug.cpp",
"IInterface.cpp",
"IPCThreadState.cpp",
"Parcel.cpp",
"ProcessState.cpp",
"Static.cpp",
"TextOutput.cpp",
],
product_variables: {
binder32bit: {
cflags: ["-DBINDER_IPC_32BIT=1"],
},
},
cflags: [
"-Wall",
"-Werror",
],
}
cc_library {
name: "libhwbinder",
defaults: [
"libhwbinder_defaults",
"hwbinder_pgo",
"hwbinder_lto"
],
}
// Explicitly provide a no lto, no PGO variant, to workaround the issue that we
// can't detect non-lto users of the module in Android.mk.
// http://b/77320844
cc_library {
name: "libhwbinder_noltopgo",
defaults: [
"libhwbinder_defaults",
],
}
// Provide pgo property to build hwbinder with PGO
cc_defaults {
name: "hwbinder_pgo",
pgo: {
instrumentation: true,
profile_file: "hwbinder/hwbinder.profdata",
benchmarks: ["hwbinder"],
enable_profile_use: true,
},
}
// Provide lto property to build hwbinder with LTO
cc_defaults {
name: "hwbinder_lto",
target: {
android: {
lto: {
thin: true,
},
},
},
}