OLD | NEW |
(Empty) | |
| 1 # Copyright (c) 2017 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 |
| 5 import("//build/compiled_action.gni") |
| 6 import("//net/features.gni") |
| 7 |
| 8 if (host_toolchain == current_toolchain) { |
| 9 source_set("transport_security_state_generator_sources") { |
| 10 sources = [ |
| 11 "bit_writer.cc", |
| 12 "bit_writer.h", |
| 13 "cert_util.cc", |
| 14 "cert_util.h", |
| 15 "huffman/huffman_builder.cc", |
| 16 "huffman/huffman_builder.h", |
| 17 "input_file_parsers.cc", |
| 18 "input_file_parsers.h", |
| 19 "pinset.cc", |
| 20 "pinset.h", |
| 21 "pinsets.cc", |
| 22 "pinsets.h", |
| 23 "preloaded_state_generator.cc", |
| 24 "preloaded_state_generator.h", |
| 25 "spki_hash.cc", |
| 26 "spki_hash.h", |
| 27 "transport_security_state_entry.cc", |
| 28 "transport_security_state_entry.h", |
| 29 "trie/trie_bit_buffer.cc", |
| 30 "trie/trie_bit_buffer.h", |
| 31 "trie/trie_writer.cc", |
| 32 "trie/trie_writer.h", |
| 33 ] |
| 34 deps = [ |
| 35 "//base", |
| 36 "//third_party/boringssl", |
| 37 ] |
| 38 } |
| 39 |
| 40 source_set("transport_security_state_generator_test_sources") { |
| 41 testonly = true |
| 42 sources = [ |
| 43 "bit_writer_unittest.cc", |
| 44 "cert_util_unittest.cc", |
| 45 "huffman/huffman_builder_unittest.cc", |
| 46 "input_file_parsers_unittest.cc", |
| 47 "spki_hash_unittest.cc", |
| 48 "trie/trie_bit_buffer_unittest.cc", |
| 49 "trie/trie_writer_unittest.cc", |
| 50 ] |
| 51 deps = [ |
| 52 ":transport_security_state_generator_sources", |
| 53 "//base", |
| 54 "//base/test:test_support", |
| 55 "//testing/gmock", |
| 56 "//testing/gtest", |
| 57 "//third_party/boringssl", |
| 58 ] |
| 59 } |
| 60 |
| 61 executable("transport_security_state_generator") { |
| 62 sources = [ |
| 63 "transport_security_state_generator.cc", |
| 64 ] |
| 65 deps = [ |
| 66 ":transport_security_state_generator_sources", |
| 67 "//base", |
| 68 "//crypto", |
| 69 "//third_party/boringssl", |
| 70 ] |
| 71 } |
| 72 } |
| 73 |
| 74 compiled_action_foreach("generate_test_data") { |
| 75 tool = ":transport_security_state_generator" |
| 76 sources = [ |
| 77 "../../http/transport_security_state_static_unittest1.json", |
| 78 "../../http/transport_security_state_static_unittest2.json", |
| 79 "../../http/transport_security_state_static_unittest3.json", |
| 80 ] |
| 81 |
| 82 # Inputs in order expected by the command line of the tool. |
| 83 inputs = [ |
| 84 "../../http/transport_security_state_static_unittest.pins", |
| 85 "resources/transport_security_state_static_unittest.template", |
| 86 ] |
| 87 outputs = [ |
| 88 "$target_gen_dir/../../http/{{source_name_part}}.h", |
| 89 ] |
| 90 args = |
| 91 [ rebase_path("../../http/{{source_name_part}}.json", root_build_dir) ] + |
| 92 rebase_path(inputs, root_build_dir) + rebase_path(outputs, root_build_dir) |
| 93 } |
OLD | NEW |