xref: /aosp_15_r20/external/dlmalloc/Android.bp (revision 2680e0c0bdff5fc86b0432efeeb5c26d7a2d8c83)
1//
2// Copyright (C) 2022 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8//      http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
17package {
18    default_applicable_licenses: ["external_dlmalloc_license"],
19}
20
21
22license {
23    name: "external_dlmalloc_license",
24    visibility: [":__subpackages__"],
25    license_kinds: ["legacy_unencumbered"],
26    license_text: ["NOTICE"],
27}
28
29// In an ideal world, dlmalloc should be declared as a cc_static_library and
30// linked against libart, but at the moment dlmalloc.c (the source file) is
31// included directly in art/runtime/gc/allocator/art-dlmalloc.cc, and that is
32// made possible by this declaration of dlmalloc as cc_library_headers.
33//
34// TODO: Find a better solution to make dlmalloc be linked against libart
35// without the current dlmalloc.c source inclusion.
36cc_library_headers {
37    name: "dlmalloc",
38    host_supported: true,
39    export_include_dirs: ["."],
40    apex_available: [
41        "com.android.art",
42        "com.android.art.debug",
43        "//apex_available:platform",
44    ],
45    min_sdk_version: "apex_inherit",
46    tidy: false,
47}
48