OLD | NEW |
---|---|
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/config/android/config.gni") | 5 import("//build/config/android/config.gni") |
6 import("//build/config/sanitizers/sanitizers.gni") | 6 import("//build/config/sanitizers/sanitizers.gni") |
7 import("//testing/libfuzzer/fuzzer_test.gni") | 7 import("//testing/libfuzzer/fuzzer_test.gni") |
8 import("BUILD.generated.gni") | 8 import("BUILD.generated.gni") |
9 import("BUILD.generated_tests.gni") | 9 import("BUILD.generated_tests.gni") |
10 | 10 |
11 declare_args() { | |
12 include_boringssl_unittests = false | |
davidben
2016/04/26 21:07:56
Oh. Actually, I would rather we at least build thi
davidben
2016/04/26 21:12:12
That or we should decide this is not a thing we ca
| |
13 } | |
14 | |
11 # Config for us and everybody else depending on BoringSSL. | 15 # Config for us and everybody else depending on BoringSSL. |
12 config("external_config") { | 16 config("external_config") { |
13 include_dirs = [ "src/include" ] | 17 include_dirs = [ "src/include" ] |
14 if (is_component_build) { | 18 if (is_component_build) { |
15 defines = [ "BORINGSSL_SHARED_LIBRARY" ] | 19 defines = [ "BORINGSSL_SHARED_LIBRARY" ] |
16 } | 20 } |
17 } | 21 } |
18 | 22 |
19 # Config internal to this build file, shared by boringssl and boringssl_fuzzer. | 23 # Config internal to this build file, shared by boringssl and boringssl_fuzzer. |
20 config("internal_config") { | 24 config("internal_config") { |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
124 } | 128 } |
125 } | 129 } |
126 | 130 |
127 create_tests("boringssl_tests") { | 131 create_tests("boringssl_tests") { |
128 configs = [ ":internal_config" ] | 132 configs = [ ":internal_config" ] |
129 deps = [ | 133 deps = [ |
130 ":boringssl", | 134 ":boringssl", |
131 ] | 135 ] |
132 } | 136 } |
133 | 137 |
134 test("boringssl_unittests") { | 138 if (include_boringssl_unittests) { |
135 deps = [ | 139 test("boringssl_unittests") { |
136 ":boringssl_tests", | 140 deps = [ |
137 "//base", | 141 ":boringssl_tests", |
138 "//base/test:run_all_unittests", | 142 "//base", |
139 "//base/test:test_support", | 143 "//base/test:run_all_unittests", |
140 "//testing/gtest", | 144 "//base/test:test_support", |
141 ] | 145 "//testing/gtest", |
142 sources = [ | 146 ] |
143 "boringssl_unittest.cc", | 147 sources = [ |
144 ] | 148 "boringssl_unittest.cc", |
149 ] | |
150 } | |
145 } | 151 } |
146 | 152 |
147 # The same as boringssl, but builds with BORINGSSL_UNSAFE_FUZZER_MODE. | 153 # The same as boringssl, but builds with BORINGSSL_UNSAFE_FUZZER_MODE. |
148 component("boringssl_fuzzer") { | 154 component("boringssl_fuzzer") { |
davidben
2016/04/26 21:05:10
Do you want to omit all these other bits too? (bor
| |
149 visibility = [ ":*" ] # Only targets in this file can depend on this. | 155 visibility = [ ":*" ] # Only targets in this file can depend on this. |
150 | 156 |
151 sources = all_sources | 157 sources = all_sources |
152 deps = [ | 158 deps = [ |
153 ":boringssl_asm", | 159 ":boringssl_asm", |
154 ] | 160 ] |
155 | 161 |
156 public_configs = [ | 162 public_configs = [ |
157 ":external_config", | 163 ":external_config", |
158 ":fuzzer_config", | 164 ":fuzzer_config", |
(...skipping 12 matching lines...) Expand all Loading... | |
171 fuzzer_test("boringssl_${fuzzer}_fuzzer") { | 177 fuzzer_test("boringssl_${fuzzer}_fuzzer") { |
172 sources = [ | 178 sources = [ |
173 "src/fuzz/${fuzzer}.cc", | 179 "src/fuzz/${fuzzer}.cc", |
174 ] | 180 ] |
175 deps = [ | 181 deps = [ |
176 ":boringssl_fuzzer", | 182 ":boringssl_fuzzer", |
177 ] | 183 ] |
178 seed_corpus = "src/fuzz/${fuzzer}_corpus" | 184 seed_corpus = "src/fuzz/${fuzzer}_corpus" |
179 } | 185 } |
180 } | 186 } |
OLD | NEW |