//
// Copyright (C) 2020 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.
//

package {
    // See: http://go/android-license-faq
    // A large-scale-change added 'default_applicable_licenses' to import
    // all of the 'license_kinds' from "art_license"
    // to get the below license kinds:
    //   SPDX-license-identifier-Apache-2.0
    default_applicable_licenses: ["art_license"],
}

cc_defaults {
    name: "odrefresh-defaults",
    srcs: [
        "odrefresh.cc",
        "odr_common.cc",
        "odr_compilation_log.cc",
        "odr_fs_utils.cc",
        "odr_metrics.cc",
        "odr_metrics_record.cc",
    ],
    local_include_dirs: ["include"],
    header_libs: ["dexoptanalyzer_headers"],
    generated_sources: [
        "apex-info-list-tinyxml",
        "art-apex-cache-info",
        "art-odrefresh-operator-srcs",
    ],
    shared_libs: [
        "libartpalette",
        "libbase",
        "liblog",
    ],
    static_libs: [
        "libc++fs",
    ],
    tidy: true,
    tidy_disabled_srcs: [":art-apex-cache-info"],
    tidy_flags: [
        "-format-style=file",
        "-header-filter=(art/odrefresh/|system/apex/)",
    ],
}

cc_defaults {
    name: "odrefresh_binary_defaults",
    defaults: [
        "art_defaults",
        "odrefresh-defaults",
    ],
    srcs: ["odrefresh_main.cc"],
    shared_libs: [
        "libdexfile",
    ],
    target: {
        android: {
            compile_multilib: "first",
        },
    },
}

cc_library_headers {
    name: "odrefresh_headers",
    defaults: ["art_defaults"],
    export_include_dirs: ["include"],
    host_supported: true,
    stl: "none",
    system_shared_libs: [],
    sdk_version: "minimum", // The minimum sdk version required by users of this module.
    apex_available: [
        "//apex_available:platform", // For odsign.
    ],
    visibility: ["//visibility:public"],
}

gensrcs {
    name: "art-odrefresh-operator-srcs",
    cmd: "$(location generate_operator_out) art/odrefresh $(in) > $(out)",
    tools: ["generate_operator_out"],
    srcs: [
        "odr_metrics.h",
    ],
    output_extension: "operator_out.cc",
}

art_cc_binary {
    name: "odrefresh",
    defaults: ["odrefresh_binary_defaults"],
    required: [
        "dexoptanalyzer",
        "dex2oat",
    ],
    shared_libs: [
        "libart",
        "libartbase",
    ],
    apex_available: [
        "com.android.art",
        "com.android.art.debug",
    ],
}

// A no-op version of the odrefresh binary.
art_cc_binary {
    name: "odrefresh_broken",
    defaults: ["art_defaults"],
    stem: "odrefresh",
    local_include_dirs: ["include"],
    header_libs: ["libbase_headers"],
    srcs: ["odrefresh_broken.cc"],
    apex_available: ["test_jitzygote_com.android.art"],
}

art_cc_binary {
    name: "odrefreshd",
    defaults: [
        "art_debug_defaults",
        "odrefresh_binary_defaults",
    ],
    required: [
        "dexoptanalyzerd",
        "dex2oatd",
    ],
    shared_libs: [
        "libartd",
        "libartbased",
    ],
    apex_available: [
        "com.android.art.debug",
        // TODO(b/183882457): This binary doesn't go into com.android.art, but
        // apex_available lists need to be the same for internal libs to avoid
        // stubs, and this depends on libartd.
        "com.android.art",
    ],
}

cc_library_static {
    name: "libodrstatslog",
    defaults: ["art_defaults"],
    host_supported: true,
    export_include_dirs: ["include"],
    local_include_dirs: ["include"],
    header_libs: ["libart_headers"],
    shared_libs: ["libartbase"],
    target: {
        android: {
            generated_headers: ["statslog_odrefresh.h"],
            generated_sources: ["statslog_odrefresh.cpp"],
            srcs: [
                "odr_metrics_record.cc",
                "odr_statslog_android.cc",
            ],
            shared_libs: ["libstatssocket"],
        },
        host: {
            srcs: ["odr_statslog_host.cc"],
        },
    },
    apex_available: [
        "com.android.art",
        "com.android.art.debug",
    ],
}

art_cc_defaults {
    name: "art_odrefresh_tests_defaults",
    defaults: ["odrefresh-defaults"],
    header_libs: ["odrefresh_headers"],
    srcs: [
        "odr_artifacts_test.cc",
        "odr_common_test.cc",
        "odr_compilation_log_test.cc",
        "odr_fs_utils_test.cc",
        "odr_metrics_test.cc",
        "odr_metrics_record_test.cc",
        "odrefresh_test.cc",
    ],
    static_libs: [
        "libgmock",
    ],
}

// Version of ART gtest `art_odrefresh_tests` bundled with the ART APEX on target.
// TODO(b/192274705): Remove this module when the migration to standalone ART gtests is complete.
art_cc_test {
    name: "art_odrefresh_tests",
    defaults: [
        "art_gtest_defaults",
        "art_odrefresh_tests_defaults",
    ],
    host_supported: false,
    shared_libs: [
        "libdexfiled",
    ],
    // The test config template is needed even though it's not used by the test
    // runner. Otherwise, Soong will generate a test config, which is adding
    // `art-host-test` as a test tag, while this test does not support running
    // on host.
    // TODO(b/214016626): Remove this line once the bug is fixed.
    test_config_template: "//art/test:art-gtests-target-standalone-template",
}

// Standalone version of ART gtest `art_odrefresh_tests`, not bundled with the ART APEX on target.
art_cc_test {
    name: "art_standalone_odrefresh_tests",
    defaults: [
        "art_standalone_gtest_defaults",
        "art_odrefresh_tests_defaults",
    ],
    shared_libs: [
        "libdexfile",
    ],
}

genrule {
    name: "statslog_odrefresh.h",
    tools: ["stats-log-api-gen"],
    cmd: "$(location stats-log-api-gen) --header $(genDir)/statslog_odrefresh.h --module art --namespace art,metrics,statsd",
    out: [
        "statslog_odrefresh.h",
    ],
}

genrule {
    name: "statslog_odrefresh.cpp",
    tools: ["stats-log-api-gen"],
    cmd: "$(location stats-log-api-gen) --cpp $(genDir)/statslog_odrefresh.cpp --module art --namespace art,metrics,statsd --importHeader statslog_odrefresh.h",
    out: [
        "statslog_odrefresh.cpp",
    ],
}

xsd_config {
    name: "art-apex-cache-info",
    srcs: ["CacheInfo.xsd"],
    package_name: "com.android.art",
    api_dir: "schema",
    gen_writer: true,
    tinyxml: true,
}
