blob: dc0c9679ebb91a075da6452c9274e0c4adc05050 [file] [log] [blame]
//
// Copyright (C) 2017 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.
cc_defaults {
name: "libatap_defaults",
cflags: [
"-D_FILE_OFFSET_BITS=64",
"-D_POSIX_C_SOURCE=199309L",
"-Wa,--noexecstack",
"-Werror",
"-Wall",
"-Wextra",
"-Wformat=2",
"-Wno-psabi",
"-Wno-unused-parameter",
"-ffunction-sections",
"-fstack-protector-strong",
"-g",
"-DATAP_ENABLE_DEBUG",
],
cppflags: [
"-Wnon-virtual-dtor",
"-fno-strict-aliasing",
],
ldflags: [
"-Wl,--gc-sections",
"-rdynamic",
],
target: {
darwin: {
enabled: false,
},
},
}
// Build libatap for the host (for unit tests).
cc_library_host_static {
name: "libatap_host",
defaults: ["libatap_defaults"],
srcs: [
"libatap/atap_commands.c",
"libatap/atap_util.c",
],
cflags: [
"-fno-stack-protector",
],
export_include_dirs: ["."],
}
cc_test_host {
name: "libatap_host_unittest",
defaults: ["libatap_defaults"],
srcs: [
"ops/atap_ops_provider.cpp",
"ops/openssl_ops.cpp",
"test/atap_util_unittest.cpp",
"test/atap_command_unittest.cpp",
"test/atap_sysdeps_posix_testing.cpp",
"test/fake_atap_ops.cpp",
],
static_libs: [
"libbase",
"libatap_host",
"liblog",
"libgmock",
"libgtest",
],
shared_libs: [
"libchrome",
"libcrypto",
],
}