Created
October 15, 2018 11:26
-
-
Save mraleph/35558ec14b94be903eed306abda401f6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/third_party/gtest/BUILD.gn b/third_party/gtest/BUILD.gn | |
index db5f4a56..f47d0437 100644 | |
--- a/third_party/gtest/BUILD.gn | |
+++ b/third_party/gtest/BUILD.gn | |
@@ -41,7 +41,7 @@ if (crashpad_is_in_chromium) { | |
"//third_party/googletest:gmock", | |
] | |
} | |
-} else if (crashpad_is_standalone) { | |
+} else if (crashpad_is_external || crashpad_is_standalone) { | |
config("gtest_private_config") { | |
visibility = [ ":*" ] | |
include_dirs = [ "gtest/googletest" ] | |
@@ -91,9 +91,11 @@ if (crashpad_is_in_chromium) { | |
] | |
sources -= [ "gtest/googletest/src/gtest-all.cc" ] | |
public_configs = [ ":gtest_public_config" ] | |
- configs -= [ | |
- "//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors", | |
- ] | |
+ if (!crashpad_is_external) { | |
+ configs -= [ | |
+ "//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors", | |
+ ] | |
+ } | |
configs += [ ":gtest_private_config" ] | |
} | |
@@ -130,10 +132,14 @@ if (crashpad_is_in_chromium) { | |
"gtest/googletest/test/production.cc", | |
"gtest/googletest/test/production.h", | |
] | |
- configs -= [ | |
- "//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors", | |
- ] | |
- configs += [ ":gtest_private_config" ] | |
+ if (crashpad_is_external) { | |
+ configs = [ ":gtest_private_config" ] | |
+ } else { | |
+ configs -= [ | |
+ "//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors", | |
+ ] | |
+ configs += [ ":gtest_private_config" ] | |
+ } | |
deps = [ | |
":gtest", | |
":gtest_main", | |
@@ -148,6 +154,9 @@ if (crashpad_is_in_chromium) { | |
sources = [ | |
"gtest/googletest/test/gtest_environment_test.cc", | |
] | |
+ if (crashpad_is_external) { | |
+ configs = [] | |
+ } | |
configs += [ ":gtest_private_config" ] | |
deps = [ | |
":gtest", | |
@@ -178,10 +187,14 @@ if (crashpad_is_in_chromium) { | |
"gtest/googletest/test/gtest-param-test_test.cc", | |
"gtest/googletest/test/gtest-param-test_test.h", | |
] | |
- configs -= [ | |
- "//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors", | |
- ] | |
- configs += [ ":gtest_private_config" ] | |
+ if (crashpad_is_external) { | |
+ configs = [ ":gtest_private_config" ] | |
+ } else { | |
+ configs -= [ | |
+ "//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors", | |
+ ] | |
+ configs += [ ":gtest_private_config" ] | |
+ } | |
deps = [ | |
":gtest", | |
] | |
@@ -208,6 +221,9 @@ if (crashpad_is_in_chromium) { | |
sources = [ | |
"gtest/googletest/test/gtest_repeat_test.cc", | |
] | |
+ if (crashpad_is_external) { | |
+ configs = [] | |
+ } | |
configs += [ ":gtest_private_config" ] | |
deps = [ | |
":gtest", | |
@@ -228,6 +244,9 @@ if (crashpad_is_in_chromium) { | |
sources = [ | |
"gtest/googletest/test/gtest_stress_test.cc", | |
] | |
+ if (crashpad_is_external) { | |
+ configs = [] | |
+ } | |
configs += [ ":gtest_private_config" ] | |
deps = [ | |
":gtest", | |
@@ -308,10 +327,12 @@ if (crashpad_is_in_chromium) { | |
] | |
sources -= [ "gtest/googlemock/src/gmock-all.cc" ] | |
public_configs = [ ":gmock_public_config" ] | |
- configs -= [ | |
- "//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors", | |
- ] | |
- configs += [ ":gmock_private_config" ] | |
+ if (!crashpad_is_external) { | |
+ configs -= [ | |
+ "//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors", | |
+ ] | |
+ } | |
+ configs += [ ":gtest_private_config" ] | |
deps = [ | |
":gtest", | |
] | |
@@ -346,6 +367,9 @@ if (crashpad_is_in_chromium) { | |
"gtest/googlemock/test/gmock-spec-builders_test.cc", | |
"gtest/googlemock/test/gmock_test.cc", | |
] | |
+ if (crashpad_is_external) { | |
+ configs = [] | |
+ } | |
configs += [ | |
":gmock_private_config", | |
":gtest_private_config", | |
@@ -371,6 +395,9 @@ if (crashpad_is_in_chromium) { | |
"gtest/googlemock/test/gmock_link_test.cc", | |
"gtest/googlemock/test/gmock_link_test.h", | |
] | |
+ if (crashpad_is_external) { | |
+ configs = [] | |
+ } | |
configs += [ ":gmock_private_config" ] | |
deps = [ | |
":gmock", | |
@@ -383,10 +410,14 @@ if (crashpad_is_in_chromium) { | |
sources = [ | |
"gtest/googlemock/test/gmock_stress_test.cc", | |
] | |
- configs -= [ | |
- "//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors", | |
- ] | |
- configs += [ ":gmock_private_config" ] | |
+ if (crashpad_is_external) { | |
+ configs = [ ":gtest_private_config" ] | |
+ } else { | |
+ configs -= [ | |
+ "//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors", | |
+ ] | |
+ configs += [ ":gtest_private_config" ] | |
+ } | |
deps = [ | |
":gmock", | |
":gtest", | |
diff --git a/third_party/mini_chromium/BUILD.gn b/third_party/mini_chromium/BUILD.gn | |
index e11d0111..124ce1dd 100644 | |
--- a/third_party/mini_chromium/BUILD.gn | |
+++ b/third_party/mini_chromium/BUILD.gn | |
@@ -23,6 +23,10 @@ group("base") { | |
public_deps = [ | |
"mini_chromium/base", | |
] | |
+ } else if (crashpad_is_external) { | |
+ public_deps = [ | |
+ "//third_party/mini_chromium/mini_chromium/base" | |
+ ] | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment