// Copyright (C) 2016 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"],
}

art_cc_defaults {
    name: "libart-dexlayout-defaults",
    defaults: ["art_defaults"],
    host_supported: true,
    srcs: [
        "compact_dex_writer.cc",
        "dexlayout.cc",
        "dex_ir.cc",
        "dex_ir_builder.cc",
        "dex_verify.cc",
        "dex_visualize.cc",
        "dex_writer.cc",
    ],
    export_include_dirs: ["."],
    target: {
        android: {
            shared_libs: [
                "libartpalette",
                "libbase",
            ],
        },
        not_windows: {
            shared_libs: [
                "libartpalette",
                "libbase",
            ],
        },
        windows: {
            cflags: ["-Wno-thread-safety"],
            static_libs: [
                "libartpalette",
                "libbase",
            ],
        },
    },
    shared_libs: ["libz"],
}

cc_defaults {
    name: "libart-dexlayout_static_base_defaults",
    whole_static_libs: [
        "libbase",
        "libz",
    ],
}

art_cc_library {
    name: "libart-dexlayout",
    defaults: [
        "libart-dexlayout-defaults",
    ],
    target: {
        android: {
            lto: {
                thin: true,
            },
            shared_libs: [
                "libartbase",
                "libdexfile",
                "libprofile",
            ],
        },
        not_windows: {
            shared_libs: [
                "libartbase",
                "libdexfile",
                "libprofile",
            ],
        },
        windows: {
            enabled: true,
            shared: {
                enabled: false,
            },
            static_libs: [
                "libartbase",
                "libdexfile",
                "libprofile",
            ],
        },
    },
    apex_available: [
        "com.android.art",
        "com.android.art.debug",
        "test_broken_com.android.art",
    ],
}

cc_defaults {
    name: "libart-dexlayout_static_defaults",
    defaults: [
        "libart-dexlayout_static_base_defaults",
        "libartbase_static_defaults",
        "libdexfile_static_defaults",
        "libprofile_static_defaults",
    ],
    whole_static_libs: ["libart-dexlayout"],
}

art_cc_library {
    name: "libartd-dexlayout",
    defaults: [
        "libart-dexlayout-defaults",
        "art_debug_defaults",
    ],
    target: {
        android: {
            shared_libs: [
                "libartbased",
                "libdexfiled",
                "libprofiled",
            ],
        },
        not_windows: {
            shared_libs: [
                "libartbased",
                "libdexfiled",
                "libprofiled",
            ],
        },
        windows: {
            static_libs: [
                "libartbased",
                "libdexfiled",
                "libprofiled",
            ],
        },
    },
    apex_available: [
        "com.android.art.debug",
        // TODO(b/183882457): This lib 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 libdexfiled.
        "com.android.art",
    ],
}

cc_defaults {
    name: "libartd-dexlayout_static_defaults",
    defaults: [
        "libart-dexlayout_static_base_defaults",
        "libartbased_static_defaults",
        "libdexfiled_static_defaults",
        "libprofiled_static_defaults",
    ],
    whole_static_libs: ["libartd-dexlayout"],
}

cc_defaults {
    name: "dexlayout-defaults",
    defaults: ["art_defaults"],
    host_supported: true,
    shared_libs: [
        "libbase",
    ],
}

art_cc_binary {
    name: "dexlayout",
    defaults: ["dexlayout-defaults"],
    srcs: ["dexlayout_main.cc"],
    shared_libs: [
        "libdexfile",
        "libprofile",
        "libartbase",
        "libart-dexlayout",
    ],
    apex_available: [
        "com.android.art",
        "com.android.art.debug",
        "test_broken_com.android.art",
    ],
}

art_cc_binary {
    name: "dexlayouts",
    defaults: [
        "dexlayout-defaults",
        "libart-dexlayout_static_defaults",
        "libprofile_static_defaults",
        "libdexfile_static_defaults",
        "libartbase_static_defaults",
    ],
    srcs: ["dexlayout_main.cc"],
    host_supported: true,
    device_supported: false,
    target: {
        darwin: {
            enabled: false,
        },
        windows: {
            enabled: true,
            cflags: ["-Wno-thread-safety"],
        },
    },
}

art_cc_binary {
    name: "dexlayoutd",
    defaults: [
        "art_debug_defaults",
        "dexlayout-defaults",
    ],
    srcs: ["dexlayout_main.cc"],
    shared_libs: [
        "libdexfiled",
        "libprofiled",
        "libartbased",
        "libartd-dexlayout",
    ],
    apex_available: [
        "com.android.art.debug",
    ],
}

art_cc_test {
    name: "art_dexlayout_tests",
    defaults: ["art_gtest_defaults"],
    shared_libs: [
        "libprofiled",
        "libartd-dexlayout",
    ],
    data: [
        ":art-gtest-jars-ManyMethods",
    ],
    srcs: ["dexlayout_test.cc"],
    target: {
        host: {
            required: [
                "dexdump",
                "dexlayoutd",
            ],
        },
    },
}

art_cc_binary {
    name: "dexdiag",
    defaults: ["art_defaults"],
    host_supported: true,
    srcs: ["dexdiag.cc"],
    cflags: ["-Wall"],
    shared_libs: [
        "libart",
        "libdexfile",
        "libartbase",
        "libart-dexlayout",
        "libbase",
    ],
    target: {
        android: {
            shared_libs: [
                "libmeminfo",
            ],
        },
    },
    apex_available: [
        "com.android.art",
        "com.android.art.debug",
    ],
}

art_cc_test {
    name: "art_dexdiag_tests",
    host_supported: true,
    defaults: [
        "art_gtest_defaults",
    ],
    srcs: ["dexdiag_test.cc"],
    target: {
        host: {
            required: ["dexdiag"],
        },
    },
}
