aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Cianciulli <scianciulli@google.com>2022-07-19 08:38:45 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-07-19 08:38:45 +0000
commit1ae0a0aedd5b64cc0b2ff5ca142a0859dd93ae85 (patch)
tree5b61977365c9dc1d8aa782852fde63cc002abf1b
parentc3be842f2f3d0327a3ee6c3fa6d2585b2c52bb10 (diff)
parent6d7299810bd5820d8d49cecb9f616b0dcfb010cd (diff)
downloaddlmalloc-1ae0a0aedd5b64cc0b2ff5ca142a0859dd93ae85.tar.gz
Declare dlmalloc as a cc_library_headers am: 6d7299810bmain-16k
Original change: https://android-review.googlesource.com/c/platform/external/dlmalloc/+/2139492 Change-Id: I57578cf40c349047d9607e414dbb4b034ba6eee6 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--Android.bp47
-rw-r--r--dlmalloc.c (renamed from malloc.c)0
-rw-r--r--dlmalloc.h (renamed from malloc.h)0
3 files changed, 47 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp
new file mode 100644
index 0000000..971b513
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,47 @@
+//
+// Copyright (C) 2022 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 {
+ default_applicable_licenses: ["external_dlmalloc_license"],
+}
+
+
+license {
+ name: "external_dlmalloc_license",
+ visibility: [":__subpackages__"],
+ license_kinds: ["legacy_unencumbered"],
+ license_text: ["NOTICE"],
+}
+
+// In an ideal world, dlmalloc should be declared as a cc_static_library and
+// linked against libart, but at the moment dlmalloc.c (the source file) is
+// included directly in art/runtime/gc/allocator/art-dlmalloc.cc, and that is
+// made possible by this declaration of dlmalloc as cc_library_headers.
+//
+// TODO: Find a better solution to make dlmalloc be linked against libart
+// without the current dlmalloc.c source inclusion.
+cc_library_headers {
+ name: "dlmalloc",
+ host_supported: true,
+ export_include_dirs: ["."],
+ apex_available: [
+ "com.android.art",
+ "com.android.art.debug",
+ "//apex_available:platform",
+ ],
+ min_sdk_version: "apex_inherit",
+ tidy: false,
+}
diff --git a/malloc.c b/dlmalloc.c
index a61c0da..a61c0da 100644
--- a/malloc.c
+++ b/dlmalloc.c
diff --git a/malloc.h b/dlmalloc.h
index e52c9e5..e52c9e5 100644
--- a/malloc.h
+++ b/dlmalloc.h