blob: 34813cdddf7bd51d1254e9bab51c10e216b1a40c [file] [log] [blame]
Colin Crossfe6064a2016-08-30 13:49:26 -07001//
2// Copyright (C) 2014 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
David Srbecky0adf4d82018-10-01 18:17:45 +010017// This produces human-readable asm_defines.s with the embedded compile-time constants.
18cc_object {
19 name: "asm_defines.s",
Colin Crossfe6064a2016-08-30 13:49:26 -070020 host_supported: true,
David Srbecky0adf4d82018-10-01 18:17:45 +010021 device_supported: true,
Colin Crossfe6064a2016-08-30 13:49:26 -070022 defaults: [
23 "art_debug_defaults",
24 "art_defaults",
25 ],
Paul Duffineafeeb22019-07-19 10:22:32 +010026 header_libs: [
27 "art_libartbase_headers", // For base/bit_utils.h
Orion Hodson00cb81d2020-04-03 06:47:07 +010028 "jni_headers",
Paul Duffineafeeb22019-07-19 10:22:32 +010029 "libart_runtime_headers_ndk",
30 "libdexfile_all_headers", // For dex/modifiers.h
David Sehr334b9d72018-02-12 18:27:56 -080031 ],
Martin Stjernholmcfea6672020-07-16 03:36:43 +010032 target: {
33 android: {
34 header_libs: ["libc_headers"], // TODO(b/153662223): Clean this up.
35 },
36 linux_bionic: {
37 header_libs: ["libc_headers"], // TODO(b/153662223): Clean this up.
38 },
39 },
David Srbecky0adf4d82018-10-01 18:17:45 +010040 // Produce text file rather than binary.
41 cflags: ["-S"],
42 srcs: ["asm_defines.cc"],
Jiyong Park7c2f69e2020-01-15 15:43:32 +090043 apex_available: [
44 "com.android.art.debug",
45 "com.android.art.release",
46 ],
Colin Crossfe6064a2016-08-30 13:49:26 -070047}
Igor Murashkin2bb70d32017-02-06 10:34:14 -080048
David Srbecky0adf4d82018-10-01 18:17:45 +010049// This extracts the compile-time constants from asm_defines.s and creates the header.
50cc_genrule {
Dan Willemsen2ca27802017-09-27 14:57:43 -070051 name: "cpp-define-generator-asm-support",
David Srbecky0adf4d82018-10-01 18:17:45 +010052 host_supported: true,
53 device_supported: true,
54 srcs: [":asm_defines.s"],
David Srbecky766e74f2018-10-02 17:12:24 +010055 out: ["asm_defines.h"],
David Srbecky0adf4d82018-10-01 18:17:45 +010056 tool_files: ["make_header.py"],
57 cmd: "$(location make_header.py) \"$(in)\" > \"$(out)\"",
Elliott Hughes221dfa62019-09-03 16:03:56 -070058 target: {
59 darwin: {
60 enabled: false,
61 },
62 },
Jiyong Park71f661c2020-04-28 18:20:43 +090063
64 apex_available: [
65 "com.android.art.debug",
66 "com.android.art.release",
67 ],
David Srbecky0adf4d82018-10-01 18:17:45 +010068}
69
70cc_library_headers {
71 name: "cpp-define-generator-definitions",
72 host_supported: true,
73 export_include_dirs: ["."],
Jiyong Park71f661c2020-04-28 18:20:43 +090074
75 apex_available: [
76 "com.android.art.debug",
77 "com.android.art.release",
78 ],
David Srbecky0adf4d82018-10-01 18:17:45 +010079}
80
81python_binary_host {
82 name: "cpp-define-generator-test",
83 main: "make_header_test.py",
84 srcs: [
85 "make_header.py",
86 "make_header_test.py",
87 ],
88 test_suites: ["general-tests"],
Igor Murashkin2bb70d32017-02-06 10:34:14 -080089}