forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD.gn
78 lines (67 loc) · 2.7 KB
/
BUILD.gn
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# 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")
import("//net/features.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)
}
# This has separated source_set not to let other compiles wait for the
# generate_transport_security_state task to complete.
source_set("transport_security_state_generated_files") {
# Do not publicize any header to remove build dependency.
public = []
sources = [ "transport_security_state.cc" ]
deps = [
"//build:branding_buildflags",
"//net:net_deps",
"//net:net_public_deps",
"//net/dns",
]
if (include_transport_security_state_preload_list) {
deps += [ ":generate_transport_security_state" ]
}
}