blob: 649ffa1405c32b1ffa2ea82ccaac2bc8f84d52e3 [file] [log] [blame]
Orion Hodson119733d2019-01-30 15:14:41 +00001//
2// Copyright (C) 2019 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
Bob Badour9150de62021-02-26 03:22:24 -080017package {
18 // See: http://go/android-license-faq
19 // A large-scale-change added 'default_applicable_licenses' to import
20 // all of the 'license_kinds' from "art_license"
21 // to get the below license kinds:
22 // SPDX-license-identifier-Apache-2.0
23 default_applicable_licenses: ["art_license"],
24}
25
Orion Hodson119733d2019-01-30 15:14:41 +000026cc_defaults {
Andreas Gampe0dc93b12019-05-15 10:30:22 -070027 name: "libartpalette_defaults",
28 defaults: ["art_defaults"],
29 host_supported: true,
30 export_include_dirs: ["include"],
Orion Hodson119733d2019-01-30 15:14:41 +000031}
32
Orion Hodsonc8315d92019-11-01 13:02:02 +000033cc_library_headers {
34 name: "libartpalette-headers",
35 export_include_dirs: ["include"],
36 host_supported: true,
Paul Duffincc9df4f2020-08-13 14:57:41 +010037 visibility: [
38 "//art:__subpackages__",
39 "//system/libartpalette",
40 ],
Orion Hodson119733d2019-01-30 15:14:41 +000041}
42
43// libartpalette is the dynamic loader of the platform abstraction
44// layer. It is only used on Android. For other targets, it just
45// implements a fake platform implementation.
46art_cc_library {
47 name: "libartpalette",
48 defaults: ["libartpalette_defaults"],
Orion Hodson119733d2019-01-30 15:14:41 +000049 header_libs: ["libbase_headers"],
50 target: {
51 // Targets supporting dlopen build the client library which loads
52 // and binds the methods in the libartpalette-system library.
53 android: {
Yo Chiang4c045142020-05-26 17:37:49 +080054 // libartpalette.so dlopen()'s libartpalette-system.
55 required: ["libartpalette-system"],
Orion Hodson119733d2019-01-30 15:14:41 +000056 srcs: ["apex/palette.cc"],
Jiyong Park1926f2e2020-03-11 10:21:49 +090057 shared_libs: ["liblog"],
Orion Hodson119733d2019-01-30 15:14:41 +000058 version_script: "libartpalette.map.txt",
59 },
60 linux_bionic: {
Andreas Gampe0dc93b12019-05-15 10:30:22 -070061 header_libs: ["libbase_headers"],
Orion Hodson119733d2019-01-30 15:14:41 +000062 srcs: ["system/palette_fake.cc"],
63 shared: {
Andreas Gampe0dc93b12019-05-15 10:30:22 -070064 shared_libs: [
65 "libbase",
66 "liblog",
67 ],
Orion Hodson119733d2019-01-30 15:14:41 +000068 },
69 version_script: "libartpalette.map.txt",
70 },
71 linux_glibc: {
Andreas Gampe0dc93b12019-05-15 10:30:22 -070072 header_libs: ["libbase_headers"],
Orion Hodson119733d2019-01-30 15:14:41 +000073 srcs: ["system/palette_fake.cc"],
74 shared: {
Andreas Gampe0dc93b12019-05-15 10:30:22 -070075 shared_libs: [
76 "libbase",
77 "liblog",
78 ],
Orion Hodson119733d2019-01-30 15:14:41 +000079 },
80 version_script: "libartpalette.map.txt",
81 },
82 // Targets without support for dlopen just use the sources for
83 // the system library which actually implements functionality.
84 darwin: {
85 enabled: true,
86 header_libs: ["libbase_headers"],
87 srcs: ["system/palette_fake.cc"],
Orion Hodsond3374a02019-05-02 10:56:33 +010088 static_libs: [
Andreas Gampe0dc93b12019-05-15 10:30:22 -070089 "libbase",
90 "liblog",
Orion Hodsond3374a02019-05-02 10:56:33 +010091 ],
Orion Hodson119733d2019-01-30 15:14:41 +000092 },
93 windows: {
94 enabled: true,
95 header_libs: ["libbase_headers"],
96 srcs: ["system/palette_fake.cc"],
Orion Hodsond3374a02019-05-02 10:56:33 +010097 static_libs: [
Andreas Gampe0dc93b12019-05-15 10:30:22 -070098 "libbase",
99 "liblog",
Orion Hodsond3374a02019-05-02 10:56:33 +0100100 ],
Orion Hodson119733d2019-01-30 15:14:41 +0000101 },
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700102 },
Jiyong Park066dd9022019-12-19 02:11:59 +0000103 apex_available: [
Martin Stjernholm3e9abfc2020-10-09 22:17:51 +0100104 "com.android.art",
Jiyong Park066dd9022019-12-19 02:11:59 +0000105 "com.android.art.debug",
Jiyong Park7c2f69e2020-01-15 15:43:32 +0900106 // TODO(b/142944931): remove this
107 "com.android.runtime", // due to the transitive dependency from linker
Jiyong Park066dd9022019-12-19 02:11:59 +0000108 ],
Orion Hodson119733d2019-01-30 15:14:41 +0000109}
110
111art_cc_test {
112 name: "art_libartpalette_tests",
113 defaults: ["art_gtest_defaults"],
114 host_supported: true,
115 srcs: ["apex/palette_test.cc"],
116 shared_libs: ["libartpalette"],
Orion Hodson119733d2019-01-30 15:14:41 +0000117}