blob: 6aad7fb3f86f1fcce7c509c05fd5fb21e61f03ae [file] [log] [blame]
# Copyright 2020 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/fidl/toolchain.gni")
# List of information about FIDL test libraries. Each item has:
#
# name
# Unique name to use in golden filenames.
#
# target
# Label of a FIDL target. Its target_name must be unique among all items,
# and identical to the FIDL library name.
#
# denylist
# List of tools that should not generate golden files.
# Allowed items: fidldoc, fidlgen_dart, fidlgen_go, fidlgen_hlcpp,
# fidlgen_libfuzzer, fidlgen_llcpp, fidlgen_rust, fidlgen_syzkaller.
# To exclude a library from fidlc goldens, simply comment the whole item.
#
# build_denylist
# List of tools that should not compile golden bindings.
# Allowed items: fidlgen_dart, fidlgen_go, fidlgen_hlcpp, fidlgen_libfuzzer,
# fidlgen_llcpp, fidlgen_rust.
# Tools from `denylist` are implicitly included.
#
# host_build_denylist
# List of tools that should not compile golden bindings for host.
# Allowed items: fidlgen_hlcpp, fidlgen_llcpp, fidlgen_rust.
# Tools from `build_denylist` are implicitly included.
#
# device_build_denylist
# List of tools that should not compile golden bindings for device.
# Allowed items: fidlgen_hlcpp, fidlgen_llcpp, fidlgen_rust.
# Tools from `build_denylist` are implicitly included.
#
# target_name (computed)
# Name portion of the target.
#
# library (computed)
# Name of the FIDL library (same as `target_name`).
#
# fidl_target (computed)
# Label of the library in the FIDL toolchain.
#
# fidl_gen_dir (computed)
# The target's `target_gen_dir` in `fidl_toolchain`.
#
# fidl_ir_file (computed)
# Path to the generated IR file relatively to the root build directory.
#
# Please keep sorted by name.
fidl_testdata_info = [
{
name = "arrays"
target = "//tools/fidl/fidlc/testdata:fidl.test.arrays"
denylist = [
# TODO(fxbug.dev/65465): Make fidlgen_libfuzzer work without protocols.
"fidlgen_libfuzzer",
]
},
{
name = "bindings_denylist"
target = "//tools/fidl/fidlc/testdata:fidl.test.bindingsdenylist"
host_build_denylist = [
# TODO(fxbug.dev/62573): Add ifdefs so that protocols compile on host.
"fidlgen_llcpp",
# TODO(fxbug.dev/72247): Encode libfuzzer dependency on HLCPP and LLCPP.
"fidlgen_libfuzzer",
# TODO(fxbug.dev/72247): Encode Unified CPP dependency on HLCPP and LLCPP.
"fidlgen_cpp",
]
},
{
name = "bits"
target = "//tools/fidl/fidlc/testdata:fidl.test.bits"
denylist = [
# TODO(fxbug.dev/65465): Make fidlgen_libfuzzer work without protocols.
"fidlgen_libfuzzer",
]
},
{
name = "byte_and_bytes"
target = "//tools/fidl/fidlc/testdata:fidl.test.byteandbytes"
denylist = [
# TODO(fxbug.dev/65465): Make fidlgen_libfuzzer work without protocols.
"fidlgen_libfuzzer",
]
},
{
name = "consts"
target = "//tools/fidl/fidlc/testdata:fidl.test.consts"
denylist = [
# TODO(fxbug.dev/65465): Make fidlgen_libfuzzer work without protocols.
"fidlgen_libfuzzer",
]
build_denylist = [
# TODO(fxbug.dev/62520): Insert enum/bits <-> primitive conversions.
"fidlgen_hlcpp",
"fidlgen_libfuzzer",
"fidlgen_llcpp",
"fidlgen_rust",
# TODO(fxbug.dev/62763): Fix undefined_identifier errors.
"fidlgen_dart",
# TODO(fxbug.dev/72247): Encode Unified CPP dependency on HLCPP and LLCPP.
"fidlgen_cpp",
]
},
{
name = "constants"
target = "//tools/fidl/fidlc/testdata:fidl.test.constants"
denylist = [
# TODO(fxbug.dev/45006): Implement const expressions in fidlgen.
"fidlgen_dart",
"fidlgen_go",
"fidlgen_hlcpp",
"fidlgen_libfuzzer",
"fidlgen_llcpp",
"fidlgen_rust",
# TODO(fxbug.dev/72247): Encode Unified CPP dependency on HLCPP and LLCPP.
"fidlgen_cpp",
]
},
{
name = "bits_constants"
target = "//tools/fidl/fidlc/testdata:fidl.test.bitsconstants"
},
{
name = "doc_comments"
target = "//tools/fidl/fidlc/testdata:fidl.test.doccomments"
build_denylist = [
# TODO(fxbug.dev/62523): Make protocol named "Interface" compile.
"fidlgen_llcpp",
"fidlgen_libfuzzer",
# TODO(fxbug.dev/72247): Encode Unified CPP dependency on HLCPP and LLCPP.
"fidlgen_cpp",
]
host_build_denylist = [
# TODO(fxbug.dev/62573): Add ifdefs so that protocols compile on host.
"fidlgen_llcpp",
# TODO(fxbug.dev/72247): Encode Unified CPP dependency on HLCPP and LLCPP.
"fidlgen_cpp",
]
},
{
name = "empty_struct"
target = "//tools/fidl/fidlc/testdata:fidl.test.emptystruct"
host_build_denylist = [
# TODO(fxbug.dev/62573): Add ifdefs so that protocols compile on host.
"fidlgen_llcpp",
# TODO(fxbug.dev/72247): Encode libfuzzer dependency on HLCPP and LLCPP.
"fidlgen_libfuzzer",
# TODO(fxbug.dev/72247): Encode Unified CPP dependency on HLCPP and LLCPP.
"fidlgen_cpp",
]
},
{
name = "encapsulated_structs"
target = "//tools/fidl/fidlc/testdata:fidl.test.encapsulatedstructs"
denylist = [
# TODO(fxbug.dev/65465): Make fidlgen_libfuzzer work without protocols.
"fidlgen_libfuzzer",
]
},
{
name = "enum"
target = "//tools/fidl/fidlc/testdata:fidl.test.enum"
denylist = [
# TODO(fxbug.dev/65465): Make fidlgen_libfuzzer work without protocols.
"fidlgen_libfuzzer",
]
},
{
name = "error"
target = "//tools/fidl/fidlc/testdata:fidl.test.error"
host_build_denylist = [
# TODO(fxbug.dev/62573): Add ifdefs so that protocols compile on host.
"fidlgen_llcpp",
# TODO(fxbug.dev/72247): Encode libfuzzer dependency on HLCPP and LLCPP.
"fidlgen_libfuzzer",
# TODO(fxbug.dev/72247): Encode Unified CPP dependency on HLCPP and LLCPP.
"fidlgen_cpp",
]
},
{
name = "escaping"
target = "//tools/fidl/fidlc/testdata:fidl.test.escaping"
denylist = [
# TODO(fxbug.dev/65465): Make fidlgen_libfuzzer work without protocols.
"fidlgen_libfuzzer",
]
},
{
name = "foreign_type_in_response_used_through_compose"
target = "//tools/fidl/fidlc/testdata/foreign_type_in_response_used_through_compose:fidl.test.foreigntypeinresponseusedthroughcompose"
host_build_denylist = [
# TODO(fxbug.dev/62573): Add ifdefs so that protocols compile on host.
"fidlgen_llcpp",
# TODO(fxbug.dev/72247): Encode libfuzzer dependency on HLCPP and LLCPP.
"fidlgen_libfuzzer",
# TODO(fxbug.dev/72247): Encode Unified CPP dependency on HLCPP and LLCPP.
"fidlgen_cpp",
]
},
{
name = "handles"
target = "//tools/fidl/fidlc/testdata:fidl.test.handles"
denylist = [
# TODO(fxbug.dev/65465): Make fidlgen_libfuzzer work without protocols.
"fidlgen_libfuzzer",
]
build_denylist = [
# TODO(fxbug.dev/62533): Fix many issues.
"fidlgen_hlcpp",
"fidlgen_libfuzzer",
# TODO(fxbug.dev/62526): Fix pcidevice.h include issue.
"fidlgen_llcpp",
# TODO(fxbug.dev/72247): Encode Unified CPP dependency on HLCPP and LLCPP.
"fidlgen_cpp",
# TODO(fxbug.dev/62524): Fix Ord/Hash trait issue with fidl::Resource.
"fidlgen_rust",
]
host_build_denylist = [
# TODO(fxbug.dev/62573): Add ifdefs so that protocols compile on host.
"fidlgen_llcpp",
# TODO(fxbug.dev/72247): Encode Unified CPP dependency on HLCPP and LLCPP.
"fidlgen_cpp",
]
},
{
name = "handles_in_types"
target = "//tools/fidl/fidlc/testdata:fidl.test.handlesintypes"
denylist = [
# TODO(fxbug.dev/65465): Make fidlgen_libfuzzer work without protocols.
"fidlgen_libfuzzer",
]
},
{
name = "inheritance"
target = "//tools/fidl/fidlc/testdata:fidl.test.inheritance"
host_build_denylist = [
# TODO(fxbug.dev/62573): Add ifdefs so that protocols compile on host.
"fidlgen_llcpp",
# TODO(fxbug.dev/72247): Encode libfuzzer dependency on HLCPP and LLCPP.
"fidlgen_libfuzzer",
# TODO(fxbug.dev/72247): Encode Unified CPP dependency on HLCPP and LLCPP.
"fidlgen_cpp",
]
},
{
name = "inheritance_with_recursive_decl"
target =
"//tools/fidl/fidlc/testdata:fidl.test.inheritancewithrecursivedecl"
host_build_denylist = [
# TODO(fxbug.dev/62573): Add ifdefs so that protocols compile on host.
"fidlgen_llcpp",
# TODO(fxbug.dev/72247): Encode libfuzzer dependency on HLCPP and LLCPP.
"fidlgen_libfuzzer",
# TODO(fxbug.dev/72247): Encode Unified CPP dependency on HLCPP and LLCPP.
"fidlgen_cpp",
]
},
{
name = "nullable"
target = "//tools/fidl/fidlc/testdata:fidl.test.nullable"
host_build_denylist = [
# TODO(fxbug.dev/62573): Add ifdefs so that protocols compile on host.
"fidlgen_llcpp",
# TODO(fxbug.dev/72247): Encode Unified CPP dependency on HLCPP and LLCPP.
"fidlgen_cpp",
]
},
{
name = "padding"
target = "//tools/fidl/fidlc/testdata:fidl.test.padding"
denylist = [
# TODO(fxbug.dev/65465): Make fidlgen_libfuzzer work without protocols.
"fidlgen_libfuzzer",
]
},
{
name = "placement_of_attributes"
target = "//tools/fidl/fidlc/testdata/placement_of_attributes:fidl.test.placementofattributes"
host_build_denylist = [
# TODO(fxbug.dev/62573): Add ifdefs so that protocols compile on host.
"fidlgen_llcpp",
# TODO(fxbug.dev/72247): Encode libfuzzer dependency on HLCPP and LLCPP.
"fidlgen_libfuzzer",
# TODO(fxbug.dev/72247): Encode Unified CPP dependency on HLCPP and LLCPP.
"fidlgen_cpp",
]
},
{
name = "protocol_request"
target = "//tools/fidl/fidlc/testdata:fidl.test.protocolrequest"
build_denylist = [
# TODO(fxbug.dev/62532): Fix many issues.
"fidlgen_llcpp",
# TODO(fxbug.dev/72247): Encode libfuzzer dependency on HLCPP and LLCPP.
"fidlgen_libfuzzer",
# TODO(fxbug.dev/72247): Encode Unified CPP dependency on HLCPP and LLCPP.
"fidlgen_cpp",
]
host_build_denylist = [
# TODO(fxbug.dev/62573): Add ifdefs so that protocols compile on host.
"fidlgen_llcpp",
# TODO(fxbug.dev/72247): Encode libfuzzer dependency on HLCPP and LLCPP.
"fidlgen_libfuzzer",
# TODO(fxbug.dev/72247): Encode Unified CPP dependency on HLCPP and LLCPP.
"fidlgen_cpp",
]
},
{
name = "protocols"
target = "//tools/fidl/fidlc/testdata:fidl.test.protocols"
host_build_denylist = [
# TODO(fxbug.dev/62573): Add ifdefs so that protocols compile on host.
"fidlgen_llcpp",
# TODO(fxbug.dev/72247): Encode libfuzzer dependency on HLCPP and LLCPP.
"fidlgen_libfuzzer",
# TODO(fxbug.dev/72247): Encode Unified CPP dependency on HLCPP and LLCPP.
"fidlgen_cpp",
]
},
{
name = "request_flexible_envelope"
target = "//tools/fidl/fidlc/testdata:fidl.test.requestflexibleenvelope"
host_build_denylist = [
# TODO(fxbug.dev/62573): Add ifdefs so that protocols compile on host.
"fidlgen_llcpp",
# TODO(fxbug.dev/72247): Encode Unified CPP dependency on HLCPP and LLCPP.
"fidlgen_cpp",
]
},
{
name = "service"
target = "//tools/fidl/fidlc/testdata:fidl.test.service"
host_build_denylist = [
# TODO(fxbug.dev/62573): Add ifdefs so that protocols compile on host.
"fidlgen_llcpp",
# TODO(fxbug.dev/72247): Encode libfuzzer dependency on HLCPP and LLCPP.
"fidlgen_libfuzzer",
# TODO(fxbug.dev/72247): Encode Unified CPP dependency on HLCPP and LLCPP.
"fidlgen_cpp",
]
},
{
name = "struct"
target = "//tools/fidl/fidlc/testdata:fidl.test.struct"
denylist = [
# TODO(fxbug.dev/65465): Make fidlgen_libfuzzer work without protocols.
"fidlgen_libfuzzer",
]
},
{
name = "struct_default_value_enum_library_reference"
target = "//tools/fidl/fidlc/testdata/struct_default_value_enum_library_reference:fidl.test.structdefaultvalueenumlibraryreference"
denylist = [
# TODO(fxbug.dev/65465): Make fidlgen_libfuzzer work without protocols.
"fidlgen_libfuzzer",
# TODO(fxbug.dev/45007): Syzkaller does not support enum member references
# in struct defaults.
"fidlgen_syzkaller",
]
build_denylist = [
# TODO(fxbug.dev/62761): Fix error about default value not being constant.
"fidlgen_dart",
]
},
{
name = "table"
target = "//tools/fidl/fidlc/testdata:fidl.test.table"
denylist = [
# TODO(fxbug.dev/65465): Make fidlgen_libfuzzer work without protocols.
"fidlgen_libfuzzer",
]
},
{
name = "transitive_dependencies"
target = "//tools/fidl/fidlc/testdata/transitive_dependencies:fidl.test.transitivedependencies"
denylist = [
# TODO(fxbug.dev/65465): Make fidlgen_libfuzzer work without protocols.
"fidlgen_libfuzzer",
]
},
{
name = "transitive_dependencies_compose"
target = "//tools/fidl/fidlc/testdata/transitive_dependencies_compose:fidl.test.transitivedependenciescompose"
host_build_denylist = [
# TODO(fxbug.dev/62573): Add ifdefs so that protocols compile on host.
"fidlgen_llcpp",
# TODO(fxbug.dev/72247): Encode libfuzzer dependency on HLCPP and LLCPP.
"fidlgen_libfuzzer",
# TODO(fxbug.dev/72247): Encode Unified CPP dependency on HLCPP and LLCPP.
"fidlgen_cpp",
]
},
{
name = "type_aliases"
target = "//tools/fidl/fidlc/testdata/type_aliases:fidl.test.typealiases"
denylist = [
# TODO(fxbug.dev/65465): Make fidlgen_libfuzzer work without protocols.
"fidlgen_libfuzzer",
]
},
{
name = "union"
target = "//tools/fidl/fidlc/testdata:fidl.test.union"
build_denylist = [
# TODO(fxbug.dev/55889): Escape "union" keyword.
"fidlgen_llcpp",
"fidlgen_libfuzzer",
# TODO(fxbug.dev/72247): Encode Unified CPP dependency on HLCPP and LLCPP.
"fidlgen_cpp",
]
host_build_denylist = [
# TODO(fxbug.dev/62573): Add ifdefs so that protocols compile on host.
"fidlgen_llcpp",
# TODO(fxbug.dev/72247): Encode Unified CPP dependency on HLCPP and LLCPP.
"fidlgen_cpp",
]
},
{
name = "union_sandwich"
target = "//tools/fidl/fidlc/testdata:fidl.test.unionsandwich"
denylist = [
# TODO(fxbug.dev/65465): Make fidlgen_libfuzzer work without protocols.
"fidlgen_libfuzzer",
]
host_build_denylist = [
# TODO(fxbug.dev/62573): Add ifdefs so that protocols compile on host.
"fidlgen_llcpp",
# TODO(fxbug.dev/72247): Encode Unified CPP dependency on HLCPP and LLCPP.
"fidlgen_cpp",
]
},
{
name = "vectors"
target = "//tools/fidl/fidlc/testdata:fidl.test.vectors"
denylist = [
# TODO(fxbug.dev/65465): Make fidlgen_libfuzzer work without protocols.
"fidlgen_libfuzzer",
]
},
]
# Add computed properties.
_fidl_testdata_info = fidl_testdata_info
fidl_testdata_info = []
foreach(info, _fidl_testdata_info) {
info.target_name = get_label_info(info.target, "name")
info.library = info.target_name
info.fidl_target = "${info.target}($fidl_toolchain)"
info.fidl_gen_dir = get_label_info(info.fidl_target, "target_gen_dir")
info.fidl_ir_file = "${info.fidl_gen_dir}/${info.target_name}.fidl.json"
if (!defined(info.denylist)) {
info.denylist = []
}
if (!defined(info.build_denylist)) {
info.build_denylist = []
}
if (!defined(info.host_build_denylist)) {
info.host_build_denylist = []
}
if (!defined(info.device_build_denylist)) {
info.device_build_denylist = []
}
info.build_denylist += info.denylist
info.host_build_denylist += info.build_denylist
info.device_build_denylist += info.build_denylist
fidl_testdata_info += [ info ]
}