blob: 12cb910d09fd0bb1a40ab4e735e1653a81401689 [file] [log] [blame] [edit]
// Copyright (C) 2024 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package {
default_applicable_licenses: ["external_emboss_license"],
}
license {
name: "external_emboss_license",
visibility: [":__subpackages__"],
license_kinds: [
"SPDX-license-identifier-Apache-2.0",
],
license_text: [
"LICENSE",
],
}
python_library_host {
name: "emboss_compiler",
srcs: [
"compiler/**/*.py",
],
data: [
"compiler/back_end/cpp/generated_code_templates",
"compiler/front_end/error_examples",
"compiler/front_end/prelude.emb",
"compiler/front_end/reserved_words",
],
}
// This is a python script that is dependent on the emboss_compiler library.
// Since it is not a .py file, it cannot be included as a src file in a
// python_binary_host module. Instead, a genrule invoking this script will need
// to create a python_binary_host with a wrapper python file which calls this
// script. The wrapper file will need to include the emboss_compiler library in
// its libs. This script should be included in the tool_files of the genrule and
// passed to the python wrapper as an argument in the cmd field.
filegroup {
name: "embossc_script",
srcs: [
"embossc",
],
}
cc_library_headers {
name: "emboss_runtime_headers",
cpp_std: "c++20",
vendor_available: true,
export_include_dirs: [
".",
],
host_supported: true,
}