Chromium Code Reviews| Index: net/tools/transport_security_state_generator/BUILD.gn |
| diff --git a/net/tools/transport_security_state_generator/BUILD.gn b/net/tools/transport_security_state_generator/BUILD.gn |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..4d78630f1f1a5b9d5bdb299f4c46318b60651ae0 |
| --- /dev/null |
| +++ b/net/tools/transport_security_state_generator/BUILD.gn |
| @@ -0,0 +1,59 @@ |
| +# Copyright (c) 2017 The Chromium 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/compiled_action.gni") |
| + |
| +if (host_toolchain == current_toolchain) { |
| + executable("transport_security_state_generator") { |
| + sources = [ |
| + "bit_writer.cc", |
| + "bit_writer.h", |
| + "cert_util.cc", |
| + "cert_util.h", |
| + "huffman/huffman_builder.cc", |
| + "huffman/huffman_builder.h", |
| + "pinset.cc", |
| + "pinset.h", |
| + "pinsets.cc", |
| + "pinsets.h", |
| + "preloaded_state_generator.cc", |
| + "preloaded_state_generator.h", |
| + "spki_hash.cc", |
| + "spki_hash.h", |
| + "transport_security_state_entry.cc", |
| + "transport_security_state_entry.h", |
| + "transport_security_state_generator.cc", |
| + "trie/trie_bit_buffer.cc", |
| + "trie/trie_bit_buffer.h", |
| + "trie/trie_writer.cc", |
| + "trie/trie_writer.h", |
| + ] |
| + deps = [ |
| + "//base", |
| + "//crypto", |
| + "//third_party/boringssl", |
| + ] |
| + } |
| +} |
| + |
| +compiled_action_foreach("generate_test_data") { |
| + tool = ":transport_security_state_generator" |
| + sources = [ |
| + "../../http/transport_security_state_static_unittest1.json", |
| + "../../http/transport_security_state_static_unittest2.json", |
| + "../../http/transport_security_state_static_unittest3.json", |
|
Ryan Sleevi
2017/03/17 22:17:37
So, I'm not sure this is the right or recommended
martijnc
2017/03/18 21:36:04
Updated this to not use relative paths. Also added
|
| + ] |
| + |
| + # Inputs in order expected by the command line of the tool. |
| + inputs = [ |
| + "../../http/transport_security_state_static_unittest.pins", |
| + "resources/transport_security_state_static_unittest.template", |
| + ] |
| + outputs = [ |
| + "$target_gen_dir/../../http/{{source_name_part}}.h", |
| + ] |
| + args = |
| + [ rebase_path("../../http/{{source_name_part}}.json", root_build_dir) ] + |
| + rebase_path(inputs, root_build_dir) + rebase_path(outputs, root_build_dir) |
| +} |