| # Copyright 2019 The IREE Authors | |
| # | |
| # Licensed under the Apache License v2.0 with LLVM Exceptions. | |
| # See https://llvm.org/LICENSE.txt for license information. | |
| # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| load("//build_tools/bazel:build_defs.oss.bzl", "iree_build_test", "iree_runtime_cc_library") | |
| load("//build_tools/bazel:iree_flatcc.bzl", "iree_flatbuffer_c_library") | |
| package( | |
| default_visibility = ["//visibility:public"], | |
| features = ["layering_check"], | |
| licenses = ["notice"], # Apache 2.0 | |
| ) | |
| FLATCC_ARGS = [ | |
| "--reader", | |
| "--builder", | |
| "--verifier", | |
| "--json", | |
| ] | |
| iree_flatbuffer_c_library( | |
| name = "amdgpu_executable_def_c_fbs", | |
| srcs = ["amdgpu_executable_def.fbs"], | |
| flatcc_args = FLATCC_ARGS, | |
| includes = ["executable_debug_info.fbs"], | |
| ) | |
| iree_flatbuffer_c_library( | |
| name = "bytecode_module_def_c_fbs", | |
| srcs = ["bytecode_module_def.fbs"], | |
| flatcc_args = FLATCC_ARGS, | |
| ) | |
| iree_flatbuffer_c_library( | |
| name = "cuda_executable_def_c_fbs", | |
| srcs = ["cuda_executable_def.fbs"], | |
| flatcc_args = FLATCC_ARGS, | |
| includes = ["executable_debug_info.fbs"], | |
| ) | |
| iree_flatbuffer_c_library( | |
| name = "executable_debug_info_c_fbs", | |
| srcs = ["executable_debug_info.fbs"], | |
| flatcc_args = FLATCC_ARGS, | |
| ) | |
| iree_flatbuffer_c_library( | |
| name = "hip_executable_def_c_fbs", | |
| srcs = ["hip_executable_def.fbs"], | |
| flatcc_args = FLATCC_ARGS, | |
| includes = ["executable_debug_info.fbs"], | |
| ) | |
| iree_flatbuffer_c_library( | |
| name = "metal_executable_def_c_fbs", | |
| srcs = ["metal_executable_def.fbs"], | |
| flatcc_args = FLATCC_ARGS, | |
| includes = ["executable_debug_info.fbs"], | |
| ) | |
| iree_flatbuffer_c_library( | |
| name = "vulkan_executable_def_c_fbs", | |
| srcs = ["vulkan_executable_def.fbs"], | |
| flatcc_args = FLATCC_ARGS, | |
| includes = ["executable_debug_info.fbs"], | |
| ) | |
| iree_flatbuffer_c_library( | |
| name = "webgpu_executable_def_c_fbs", | |
| srcs = ["webgpu_executable_def.fbs"], | |
| flatcc_args = FLATCC_ARGS, | |
| includes = ["executable_debug_info.fbs"], | |
| ) | |
| iree_build_test( | |
| name = "schema_build_test", | |
| targets = [ | |
| ":amdgpu_executable_def_c_fbs", | |
| ":bytecode_module_def_c_fbs", | |
| ":cuda_executable_def_c_fbs", | |
| ":executable_debug_info_c_fbs", | |
| ":hip_executable_def_c_fbs", | |
| ":metal_executable_def_c_fbs", | |
| ":vulkan_executable_def_c_fbs", | |
| ":webgpu_executable_def_c_fbs", | |
| ], | |
| ) | |
| cpu_data_headers = [ | |
| "cpu_data.h", | |
| "cpu_feature_bits.inl", | |
| ] | |
| # Filegroup used in Bazel only (only Bazel enforces header dependencies). | |
| filegroup( | |
| name = "cpu_data_headers_filegroup", | |
| srcs = cpu_data_headers, | |
| ) | |
| iree_runtime_cc_library( | |
| name = "cpu_data", | |
| hdrs = cpu_data_headers, | |
| ) | |
| iree_runtime_cc_library( | |
| name = "parameter_archive", | |
| hdrs = ["parameter_archive.h"], | |
| ) |