//
// 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",
        "libarttools", // Contains "libc++fs".
        "libbase",
        "liblog",
    ],
    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: [
        "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,
    // 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",
    ],
}

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