1// Copyright (C) 2024 The Android Open Source Project 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15package { 16 default_applicable_licenses: ["external_emboss_license"], 17} 18 19license { 20 name: "external_emboss_license", 21 visibility: [":__subpackages__"], 22 license_kinds: [ 23 "SPDX-license-identifier-Apache-2.0", 24 ], 25 license_text: [ 26 "LICENSE", 27 ], 28} 29 30python_library_host { 31 name: "emboss_compiler", 32 srcs: [ 33 "compiler/**/*.py", 34 ], 35 data: [ 36 "compiler/back_end/cpp/generated_code_templates", 37 "compiler/front_end/error_examples", 38 "compiler/front_end/prelude.emb", 39 "compiler/front_end/reserved_words", 40 ], 41} 42 43// This is a python script that is dependent on the emboss_compiler library. 44// Since it is not a .py file, it cannot be included as a src file in a 45// python_binary_host module. Instead, a genrule invoking this script will need 46// to create a python_binary_host with a wrapper python file which calls this 47// script. The wrapper file will need to include the emboss_compiler library in 48// its libs. This script should be included in the tool_files of the genrule and 49// passed to the python wrapper as an argument in the cmd field. 50filegroup { 51 name: "embossc_script", 52 srcs: [ 53 "embossc", 54 ], 55} 56 57cc_library_headers { 58 name: "emboss_runtime_headers", 59 cpp_std: "c++20", 60 vendor_available: true, 61 export_include_dirs: [ 62 ".", 63 ], 64 host_supported: true, 65} 66