blob: 65310b8949051da00de4042c1c115251bf918a4e [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
28 "libart_runtime_headers_ndk",
29 "libdexfile_all_headers", // For dex/modifiers.h
David Sehr334b9d72018-02-12 18:27:56 -080030 ],
David Srbecky0adf4d82018-10-01 18:17:45 +010031 // Produce text file rather than binary.
32 cflags: ["-S"],
33 srcs: ["asm_defines.cc"],
Jiyong Park7c2f69e2020-01-15 15:43:32 +090034 apex_available: [
35 "com.android.art.debug",
36 "com.android.art.release",
37 ],
Colin Crossfe6064a2016-08-30 13:49:26 -070038}
Igor Murashkin2bb70d32017-02-06 10:34:14 -080039
David Srbecky0adf4d82018-10-01 18:17:45 +010040// This extracts the compile-time constants from asm_defines.s and creates the header.
41cc_genrule {
Dan Willemsen2ca27802017-09-27 14:57:43 -070042 name: "cpp-define-generator-asm-support",
David Srbecky0adf4d82018-10-01 18:17:45 +010043 host_supported: true,
44 device_supported: true,
45 srcs: [":asm_defines.s"],
David Srbecky766e74f2018-10-02 17:12:24 +010046 out: ["asm_defines.h"],
David Srbecky0adf4d82018-10-01 18:17:45 +010047 tool_files: ["make_header.py"],
48 cmd: "$(location make_header.py) \"$(in)\" > \"$(out)\"",
Elliott Hughes221dfa62019-09-03 16:03:56 -070049 target: {
50 darwin: {
51 enabled: false,
52 },
53 },
David Srbecky0adf4d82018-10-01 18:17:45 +010054}
55
56cc_library_headers {
57 name: "cpp-define-generator-definitions",
58 host_supported: true,
59 export_include_dirs: ["."],
60}
61
62python_binary_host {
63 name: "cpp-define-generator-test",
64 main: "make_header_test.py",
65 srcs: [
66 "make_header.py",
67 "make_header_test.py",
68 ],
69 test_suites: ["general-tests"],
Igor Murashkin2bb70d32017-02-06 10:34:14 -080070}