2018-09-05 10:43:31 -07:00
|
|
|
//
|
|
|
|
// Copyright (C) 2018 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.
|
|
|
|
//
|
|
|
|
|
2021-02-12 17:07:05 -08:00
|
|
|
package {
|
|
|
|
// See: http://go/android-license-faq
|
|
|
|
// A large-scale-change added 'default_applicable_licenses' to import
|
|
|
|
// all of the 'license_kinds' from "frameworks_base_license"
|
|
|
|
// to get the below license kinds:
|
|
|
|
// SPDX-license-identifier-Apache-2.0
|
|
|
|
default_applicable_licenses: ["frameworks_base_license"],
|
|
|
|
}
|
|
|
|
|
2018-09-20 12:03:10 -07:00
|
|
|
cc_defaults {
|
|
|
|
name: "viewcompiler_defaults",
|
2018-10-11 16:25:57 -07:00
|
|
|
header_libs: [
|
|
|
|
"libbase_headers",
|
|
|
|
],
|
2018-09-20 12:03:10 -07:00
|
|
|
shared_libs: [
|
2018-10-11 16:25:57 -07:00
|
|
|
"libbase",
|
2018-09-20 12:03:10 -07:00
|
|
|
"slicer",
|
|
|
|
],
|
2018-12-13 16:04:56 -08:00
|
|
|
static_libs: [
|
2019-09-18 12:58:11 -07:00
|
|
|
"libcutils",
|
2018-12-13 16:04:56 -08:00
|
|
|
"libtinyxml2",
|
2018-12-21 17:25:38 -08:00
|
|
|
"liblog",
|
|
|
|
"libutils",
|
|
|
|
"libziparchive",
|
2019-10-31 15:25:33 +00:00
|
|
|
"libz",
|
2018-12-13 16:04:56 -08:00
|
|
|
],
|
2018-12-21 17:25:38 -08:00
|
|
|
cppflags: ["-std=c++17"],
|
|
|
|
target: {
|
|
|
|
android: {
|
|
|
|
shared_libs: [
|
|
|
|
"libandroidfw",
|
|
|
|
],
|
|
|
|
},
|
|
|
|
host: {
|
|
|
|
static_libs: [
|
|
|
|
"libandroidfw",
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
2018-09-20 12:03:10 -07:00
|
|
|
}
|
|
|
|
|
2019-01-14 10:25:40 -08:00
|
|
|
cc_library_static {
|
2018-09-05 10:43:31 -07:00
|
|
|
name: "libviewcompiler",
|
2018-09-20 12:03:10 -07:00
|
|
|
defaults: ["viewcompiler_defaults"],
|
2018-09-05 10:43:31 -07:00
|
|
|
srcs: [
|
2018-12-21 17:25:38 -08:00
|
|
|
"apk_layout_compiler.cc",
|
2018-09-20 12:03:10 -07:00
|
|
|
"dex_builder.cc",
|
2018-12-17 15:46:18 -08:00
|
|
|
"dex_layout_compiler.cc",
|
2018-09-05 10:43:31 -07:00
|
|
|
"java_lang_builder.cc",
|
2018-12-13 16:04:56 -08:00
|
|
|
"tinyxml_layout_parser.cc",
|
2018-09-05 10:43:31 -07:00
|
|
|
"util.cc",
|
2018-12-13 16:04:56 -08:00
|
|
|
"layout_validation.cc",
|
2018-09-05 10:43:31 -07:00
|
|
|
],
|
2019-01-14 10:25:40 -08:00
|
|
|
host_supported: true,
|
2018-09-05 10:43:31 -07:00
|
|
|
}
|
|
|
|
|
2019-01-14 10:25:40 -08:00
|
|
|
cc_binary {
|
2018-09-05 10:43:31 -07:00
|
|
|
name: "viewcompiler",
|
2018-09-20 12:03:10 -07:00
|
|
|
defaults: ["viewcompiler_defaults"],
|
2018-09-05 10:43:31 -07:00
|
|
|
srcs: [
|
|
|
|
"main.cc",
|
|
|
|
],
|
|
|
|
static_libs: [
|
|
|
|
"libgflags",
|
|
|
|
"libviewcompiler",
|
|
|
|
],
|
2019-01-14 10:25:40 -08:00
|
|
|
host_supported: true
|
2018-09-05 10:43:31 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
cc_test_host {
|
|
|
|
name: "view-compiler-tests",
|
2018-09-20 12:03:10 -07:00
|
|
|
defaults: ["viewcompiler_defaults"],
|
2018-09-05 10:43:31 -07:00
|
|
|
srcs: [
|
2018-12-13 16:04:56 -08:00
|
|
|
"layout_validation_test.cc",
|
2018-09-05 10:43:31 -07:00
|
|
|
"util_test.cc",
|
|
|
|
],
|
|
|
|
static_libs: [
|
|
|
|
"libviewcompiler",
|
2018-09-20 12:03:10 -07:00
|
|
|
],
|
2018-09-05 10:43:31 -07:00
|
|
|
}
|
2018-10-26 16:08:09 -07:00
|
|
|
|
|
|
|
cc_binary_host {
|
|
|
|
name: "dex_testcase_generator",
|
|
|
|
defaults: ["viewcompiler_defaults"],
|
|
|
|
srcs: ["dex_testcase_generator.cc"],
|
|
|
|
static_libs: [
|
|
|
|
"libviewcompiler",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
genrule {
|
|
|
|
name: "generate_dex_testcases",
|
|
|
|
tools: [":dex_testcase_generator"],
|
|
|
|
cmd: "$(location :dex_testcase_generator) $(genDir)",
|
|
|
|
out: [
|
|
|
|
"simple.dex",
|
|
|
|
"trivial.dex",
|
|
|
|
],
|
|
|
|
}
|