blob: 0d3943e141c6d205579695db96702888980dc6a5 [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 ],
David Sehr334b9d72018-02-12 18:27:56 -080026 include_dirs: [
David Sehr67bf42e2018-02-26 16:43:04 -080027 "art/libartbase",
David Sehr334b9d72018-02-12 18:27:56 -080028 "art/libdexfile",
David Sehr1f010162018-05-15 08:59:32 -070029 "art/libartbase",
David Sehr334b9d72018-02-12 18:27:56 -080030 "art/runtime",
David Srbecky0adf4d82018-10-01 18:17:45 +010031 "system/core/base/include",
David Sehr334b9d72018-02-12 18:27:56 -080032 ],
David Srbecky0adf4d82018-10-01 18:17:45 +010033 // Produce text file rather than binary.
34 cflags: ["-S"],
35 srcs: ["asm_defines.cc"],
Colin Crossfe6064a2016-08-30 13:49:26 -070036}
Igor Murashkin2bb70d32017-02-06 10:34:14 -080037
David Srbecky0adf4d82018-10-01 18:17:45 +010038// This extracts the compile-time constants from asm_defines.s and creates the header.
39cc_genrule {
Dan Willemsen2ca27802017-09-27 14:57:43 -070040 name: "cpp-define-generator-asm-support",
David Srbecky0adf4d82018-10-01 18:17:45 +010041 host_supported: true,
42 device_supported: true,
43 srcs: [":asm_defines.s"],
Dan Willemsen2ca27802017-09-27 14:57:43 -070044 out: ["asm_support_gen.h"],
David Srbecky0adf4d82018-10-01 18:17:45 +010045 tool_files: ["make_header.py"],
46 cmd: "$(location make_header.py) \"$(in)\" > \"$(out)\"",
47}
48
49cc_library_headers {
50 name: "cpp-define-generator-definitions",
51 host_supported: true,
52 export_include_dirs: ["."],
53}
54
55python_binary_host {
56 name: "cpp-define-generator-test",
57 main: "make_header_test.py",
58 srcs: [
59 "make_header.py",
60 "make_header_test.py",
61 ],
62 test_suites: ["general-tests"],
Igor Murashkin2bb70d32017-02-06 10:34:14 -080063}