Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: third_party/boringssl/BUILD.gn

Issue 1919383002: GN: Put BoringSSL Chromium specific targets inside a condition (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added comment for build_with_chromium variable Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« build_overrides/build.gni ('K') | « build_overrides/webrtc.gni ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/boringssl/BUILD.gn
diff --git a/third_party/boringssl/BUILD.gn b/third_party/boringssl/BUILD.gn
index c4fa8681fc1acfa36690b307192236dbe87beebf..d4f00cfe726d3fbcbb0f3b8a0dddc1604ee5dfce 100644
--- a/third_party/boringssl/BUILD.gn
+++ b/third_party/boringssl/BUILD.gn
@@ -4,6 +4,7 @@
import("//build/config/android/config.gni")
import("//build/config/sanitizers/sanitizers.gni")
+import("//build_overrides/build.gni")
import("//testing/libfuzzer/fuzzer_test.gni")
import("BUILD.generated.gni")
import("BUILD.generated_tests.gni")
@@ -131,50 +132,52 @@ create_tests("boringssl_tests") {
]
}
-test("boringssl_unittests") {
- deps = [
- ":boringssl_tests",
- "//base",
- "//base/test:run_all_unittests",
- "//base/test:test_support",
- "//testing/gtest",
- ]
- sources = [
- "boringssl_unittest.cc",
- ]
-}
+if (build_with_chromium) {
+ test("boringssl_unittests") {
+ deps = [
+ ":boringssl_tests",
+ "//base",
+ "//base/test:run_all_unittests",
+ "//base/test:test_support",
+ "//testing/gtest",
+ ]
+ sources = [
+ "boringssl_unittest.cc",
+ ]
+ }
-# The same as boringssl, but builds with BORINGSSL_UNSAFE_FUZZER_MODE.
-component("boringssl_fuzzer") {
- visibility = [ ":*" ] # Only targets in this file can depend on this.
+ # The same as boringssl, but builds with BORINGSSL_UNSAFE_FUZZER_MODE.
+ component("boringssl_fuzzer") {
+ visibility = [ ":*" ] # Only targets in this file can depend on this.
- sources = all_sources
- deps = [
- ":boringssl_asm",
- ]
+ sources = all_sources
+ deps = [
+ ":boringssl_asm",
+ ]
- public_configs = [
- ":external_config",
- ":fuzzer_config",
- ]
- configs += [ ":internal_config" ]
+ public_configs = [
+ ":external_config",
+ ":fuzzer_config",
+ ]
+ configs += [ ":internal_config" ]
- configs -= [ "//build/config/compiler:chromium_code" ]
- configs += [ "//build/config/compiler:no_chromium_code" ]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
- if (is_nacl) {
- deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
+ if (is_nacl) {
+ deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
+ }
}
-}
-foreach(fuzzer, fuzzers) {
- fuzzer_test("boringssl_${fuzzer}_fuzzer") {
- sources = [
- "src/fuzz/${fuzzer}.cc",
- ]
- deps = [
- ":boringssl_fuzzer",
- ]
- seed_corpus = "src/fuzz/${fuzzer}_corpus"
+ foreach(fuzzer, fuzzers) {
+ fuzzer_test("boringssl_${fuzzer}_fuzzer") {
+ sources = [
+ "src/fuzz/${fuzzer}.cc",
+ ]
+ deps = [
+ ":boringssl_fuzzer",
+ ]
+ seed_corpus = "src/fuzz/${fuzzer}_corpus"
+ }
}
}
« build_overrides/build.gni ('K') | « build_overrides/webrtc.gni ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698