summaryrefslogtreecommitdiff
path: root/chromium/net/http/BUILD.gn
blob: d00da41da1d8bbc40d8a85d582c1966ed22eaaf1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Copyright 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")

# Generates a header file based on the real preload list.
compiled_action("generate_transport_security_state") {
  tool = "//net/tools/transport_security_state_generator"

  # Inputs in order expected by the command line of the tool.
  inputs = [
    "transport_security_state_static.json",
    "transport_security_state_static.pins",
    "transport_security_state_static.template",
  ]
  outputs = [
    "$target_gen_dir/transport_security_state_static.h",
  ]
  args =
      rebase_path(inputs, root_build_dir) + rebase_path(outputs, root_build_dir)
}

# Generates a header file for use in unittests.
compiled_action("transport_security_state_unittest_data_default") {
  tool = "//net/tools/transport_security_state_generator"

  # Inputs in order expected by the command line of the tool.
  inputs = [
    "transport_security_state_static_unittest_default.json",
    "transport_security_state_static_unittest_default.pins",
    "transport_security_state_static_unittest.template",
  ]
  outputs = [
    "$target_gen_dir/transport_security_state_static_unittest_default.h",
  ]
  args =
      rebase_path(inputs, root_build_dir) + rebase_path(outputs, root_build_dir)
}

# Generates a number of header files that are used by integration tests for the
# generation process and preload format.
compiled_action_foreach("transport_security_state_unittest_data") {
  tool = "//net/tools/transport_security_state_generator"
  sources = [
    "transport_security_state_static_unittest1.json",
    "transport_security_state_static_unittest2.json",
    "transport_security_state_static_unittest3.json",
  ]

  # Inputs in order expected by the command line of the tool.
  inputs = [
    "transport_security_state_static_unittest.pins",
    "transport_security_state_static_unittest.template",
  ]
  outputs = [
    "$target_gen_dir/{{source_name_part}}.h",
  ]
  args =
      [ rebase_path("{{source_name_part}}.json", root_build_dir) ] +
      rebase_path(inputs, root_build_dir) + rebase_path(outputs, root_build_dir)
}