//
// 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: [
        "libbase",
        "liblog",
        "libselinux",
    ],
    static_libs: [
        "libmodules-utils-build",
    ],
    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: [
        "libarttools", // Contains "libc++fs".
        "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",
        "test_broken_com.android.art",
    ],
}

// 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"],
    installable: false,
    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",
        "test_broken_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: [
                "libstatspull",
                "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: [
        "libarttools",
    ],
    // 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",
    ],
    static_libs: [
        "libarttools",
    ],
}

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,
}
