1// 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 17// This produces human-readable asm_defines.s with the embedded compile-time constants. 18cc_object { 19 name: "asm_defines.s", 20 host_supported: true, 21 device_supported: true, 22 defaults: [ 23 "art_debug_defaults", 24 "art_defaults", 25 ], 26 header_libs: [ 27 "art_libartbase_headers", // For base/bit_utils.h 28 "libart_runtime_headers_ndk", 29 "libdexfile_all_headers", // For dex/modifiers.h 30 ], 31 // Produce text file rather than binary. 32 cflags: ["-S"], 33 srcs: ["asm_defines.cc"], 34 apex_available: [ 35 "com.android.art.debug", 36 "com.android.art.release", 37 ], 38} 39 40// This extracts the compile-time constants from asm_defines.s and creates the header. 41cc_genrule { 42 name: "cpp-define-generator-asm-support", 43 host_supported: true, 44 device_supported: true, 45 srcs: [":asm_defines.s"], 46 out: ["asm_defines.h"], 47 tool_files: ["make_header.py"], 48 cmd: "$(location make_header.py) \"$(in)\" > \"$(out)\"", 49 target: { 50 darwin: { 51 enabled: false, 52 }, 53 }, 54 55 apex_available: [ 56 "com.android.art.debug", 57 "com.android.art.release", 58 ], 59} 60 61cc_library_headers { 62 name: "cpp-define-generator-definitions", 63 host_supported: true, 64 export_include_dirs: ["."], 65 66 apex_available: [ 67 "com.android.art.debug", 68 "com.android.art.release", 69 ], 70} 71 72python_binary_host { 73 name: "cpp-define-generator-test", 74 main: "make_header_test.py", 75 srcs: [ 76 "make_header.py", 77 "make_header_test.py", 78 ], 79 test_suites: ["general-tests"], 80} 81