| # Copyright 2018 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/fuzzing/fuzzer.gni") |
| |
| static_library("expr") { |
| sources = [ |
| "abi.h", |
| "abi_arm64.cc", |
| "abi_arm64.h", |
| "abi_null.h", |
| "abi_x64.cc", |
| "abi_x64.h", |
| "bitfield.cc", |
| "bitfield.h", |
| "builtin_types.cc", |
| "builtin_types.h", |
| "cast.cc", |
| "cast.h", |
| "eval_callback.h", |
| "eval_context.h", |
| "eval_context_impl.cc", |
| "eval_context_impl.h", |
| "eval_dwarf_expr.cc", |
| "eval_dwarf_expr.h", |
| "eval_operators.cc", |
| "eval_operators.h", |
| "expr.cc", |
| "expr.h", |
| "expr_language.cc", |
| "expr_language.h", |
| "expr_node.cc", |
| "expr_node.h", |
| "expr_parser.cc", |
| "expr_parser.h", |
| "expr_token.h", |
| "expr_token_type.cc", |
| "expr_token_type.h", |
| "expr_tokenizer.cc", |
| "expr_tokenizer.h", |
| "expr_value.cc", |
| "expr_value.h", |
| "expr_value_source.cc", |
| "expr_value_source.h", |
| "find_name.cc", |
| "find_name.h", |
| "format.cc", |
| "format.h", |
| "format_node.cc", |
| "format_node.h", |
| "format_options.h", |
| "found_member.cc", |
| "found_member.h", |
| "found_name.cc", |
| "found_name.h", |
| "identifier_glob.cc", |
| "identifier_glob.h", |
| "index_walker.cc", |
| "index_walker.h", |
| "keywords.cc", |
| "keywords.h", |
| "number_parser.cc", |
| "number_parser.h", |
| "operator_keyword.cc", |
| "operator_keyword.h", |
| "parse_special_identifier.cc", |
| "parse_special_identifier.h", |
| "parse_string.cc", |
| "parse_string.h", |
| "parsed_identifier.cc", |
| "parsed_identifier.h", |
| "permissive_input_location.cc", |
| "permissive_input_location.h", |
| "pretty_rust_tuple.cc", |
| "pretty_rust_tuple.h", |
| "pretty_std_string.cc", |
| "pretty_std_string.h", |
| "pretty_tree.cc", |
| "pretty_tree.h", |
| "pretty_type.cc", |
| "pretty_type.h", |
| "pretty_type_manager.cc", |
| "pretty_type_manager.h", |
| "resolve_array.cc", |
| "resolve_array.h", |
| "resolve_base.cc", |
| "resolve_base.h", |
| "resolve_collection.cc", |
| "resolve_collection.h", |
| "resolve_const_value.cc", |
| "resolve_const_value.h", |
| "resolve_ptr_ref.cc", |
| "resolve_ptr_ref.h", |
| "resolve_type.cc", |
| "resolve_type.h", |
| "resolve_variant.cc", |
| "resolve_variant.h", |
| "return_value.cc", |
| "return_value.h", |
| "template_type_extractor.cc", |
| "template_type_extractor.h", |
| "vector_register_format.cc", |
| "vector_register_format.h", |
| ] |
| |
| public_deps = [ |
| "//sdk/lib/fit", |
| "//src/developer/debug/zxdb/common", |
| "//src/developer/debug/zxdb/symbols", |
| "//src/lib/fxl", |
| "//third_party/double-conversion", |
| ] |
| |
| # TODO(fxbug.dev/58162): delete the below and fix compiler warnings |
| configs += [ "//build/config:Wno-conversion" ] |
| } |
| |
| source_set("test_support") { |
| testonly = true |
| |
| sources = [ |
| "mock_eval_context.cc", |
| "mock_eval_context.h", |
| "test_eval_context_impl.h", |
| ] |
| |
| public_deps = [ |
| ":expr", |
| "//src/developer/debug/zxdb/symbols:test_support", |
| ] |
| |
| # TODO(fxbug.dev/58162): delete the below and fix compiler warnings |
| configs += [ "//build/config:Wno-conversion" ] |
| } |
| |
| source_set("tests") { |
| testonly = true |
| |
| sources = [ |
| "bitfield_unittest.cc", |
| "builtin_types_unittest.cc", |
| "cast_unittest.cc", |
| "eval_context_impl_unittest.cc", |
| "eval_dwarf_expr_unittest.cc", |
| "eval_operators_unittest.cc", |
| "eval_test_support.cc", |
| "eval_test_support.h", |
| "expr_language_unittest.cc", |
| "expr_node_unittest.cc", |
| "expr_parser_unittest.cc", |
| "expr_tokenizer_unittest.cc", |
| "expr_unittest.cc", |
| "expr_value_source_unittest.cc", |
| "expr_value_unittest.cc", |
| "find_name_unittest.cc", |
| "format_test_support.cc", |
| "format_test_support.h", |
| "format_unittest.cc", |
| "identifier_glob_unittest.cc", |
| "index_walker_unittest.cc", |
| "mock_expr_node.cc", |
| "mock_expr_node.h", |
| "number_parser_unittest.cc", |
| "operator_keyword_unittest.cc", |
| "parse_special_identifier_unittest.cc", |
| "parse_string_unittest.cc", |
| "parsed_identifier_unittest.cc", |
| "permissive_input_location_unittest.cc", |
| "pretty_rust_tuple_unittest.cc", |
| "pretty_std_string_unittest.cc", |
| "pretty_type_manager_unittest.cc", |
| "pretty_type_unittest.cc", |
| "resolve_array_unittest.cc", |
| "resolve_base_unittest.cc", |
| "resolve_collection_unittest.cc", |
| "resolve_ptr_ref_unittest.cc", |
| "resolve_type_unittest.cc", |
| "resolve_variant_unittest.cc", |
| "return_value_unittest.cc", |
| "template_type_extractor_unittest.cc", |
| "vector_register_format_unittest.cc", |
| "virtual_base_test_setup.cc", |
| "virtual_base_test_setup.h", |
| "virtual_inheritance_test_setup.cc", |
| "virtual_inheritance_test_setup.h", |
| ] |
| |
| # Note: this should not depend on client/ or console/ libraries, including their test_support. |
| deps = [ |
| ":expr", |
| ":test_support", |
| "//src/developer/debug/zxdb/common:test_support", |
| "//src/developer/debug/zxdb/symbols:test_support", |
| "//src/lib/llvm:LLVMBinaryFormat", |
| "//third_party/googletest:gtest", |
| ] |
| |
| # TODO(fxbug.dev/58162): delete the below and fix compiler warnings |
| configs += [ "//build/config:Wno-conversion" ] |
| } |
| |
| fuzzer("expr_parser_fuzzer") { |
| sources = [ "expr_parser_fuzzer.cc" ] |
| deps = [ ":expr" ] |
| } |
| |
| fuzzers_package("expr_fuzzers") { |
| fuzzers = [ ":expr_parser_fuzzer" ] |
| host_only = true |
| } |