From 1bc07b76ed2c66e892b300e51c9512e005c7844b Mon Sep 17 00:00:00 2001 From: Scott Graham Date: Mon, 18 Dec 2017 16:01:51 -0800 Subject: [PATCH] gn: Use mini_chromium_is_posix in preference to global is_posix Goes with https://chromium-review.googlesource.com/c/chromium/mini_chromium/+/833328. Also roll mini_chromium: scottmg@around:/work/crashpad/crashpad/third_party/mini_chromium/mini_chromium$ git log 20182dd263312db9fad52042fc92c33331ec6904..e182031 --oneline e182031 gn: Add is_posix.gni to define local is_posix variable 4cb1344 gn: Enable proper release-mode optimizations for POSIX-non-Mac 9c0eb0c Remove reference to ptr_util.h c5ae5aa gn: Configure the sysroot in target_sysroot, not sysroot f7e5654 gn, mac: Honor mac_sdk_min, sysroot, and mac_deployment_target 7701901 Remove the deprecated sparse_histogram.h header. e2f0160 Use Chromium copyright notice and BSD license in mini_chromium Bug: crashpad:79, crashpad:196 Change-Id: Ie41d971e0e769db2ed18861da07021c071f6c650 Reviewed-on: https://chromium-review.googlesource.com/833329 Commit-Queue: Scott Graham Reviewed-by: Mark Mentovai --- DEPS | 2 +- build/BUILDCONFIG.gn | 2 -- build/crashpad_dependencies.gni | 12 +++++++++++- test/BUILD.gn | 6 ++++-- util/BUILD.gn | 8 ++++---- 5 files changed, 20 insertions(+), 10 deletions(-) diff --git a/DEPS b/DEPS index c59ff430..e221cad1 100644 --- a/DEPS +++ b/DEPS @@ -28,7 +28,7 @@ deps = { '5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f', 'crashpad/third_party/mini_chromium/mini_chromium': Var('chromium_git') + '/chromium/mini_chromium@' + - '20182dd263312db9fad52042fc92c33331ec6904', + 'e182031c61072f629494a1f52729a8d29a6acace', 'crashpad/third_party/zlib/zlib': Var('chromium_git') + '/chromium/src/third_party/zlib@' + '13dc246a58e4b72104d35f9b1809af95221ebda7', diff --git a/build/BUILDCONFIG.gn b/build/BUILDCONFIG.gn index a033e823..58178818 100644 --- a/build/BUILDCONFIG.gn +++ b/build/BUILDCONFIG.gn @@ -52,8 +52,6 @@ if (current_os == "mac") { is_fuchsia = true } -is_posix = is_mac || is_linux || is_android || is_fuchsia - if (is_win) { set_default_toolchain( "//third_party/mini_chromium/mini_chromium/build:msvc_toolchain") diff --git a/build/crashpad_dependencies.gni b/build/crashpad_dependencies.gni index ae6e1196..e786420f 100644 --- a/build/crashpad_dependencies.gni +++ b/build/crashpad_dependencies.gni @@ -27,6 +27,16 @@ crashpad_is_in_chromium = crashpad_dependencies == "chromium" crashpad_is_in_fuchsia = crashpad_dependencies == "fuchsia" crashpad_is_standalone = crashpad_dependencies == "standalone" +if (crashpad_is_in_chromium) { + crashpad_is_posix = is_posix +} else if (crashpad_is_in_fuchsia) { + import("//third_party/mini_chromium/build/is_posix.gni") + crashpad_is_posix = mini_chromium_is_posix +} else if (crashpad_is_standalone) { + import("../third_party/mini_chromium/mini_chromium/build/is_posix.gni") + crashpad_is_posix = mini_chromium_is_posix +} + if (crashpad_is_in_chromium) { import("//testing/test.gni") } else { @@ -38,6 +48,6 @@ if (crashpad_is_in_chromium) { } set_defaults("test") { - configs = default_configs + configs = _default_configs } } diff --git a/test/BUILD.gn b/test/BUILD.gn index 21948a72..e6a08a12 100644 --- a/test/BUILD.gn +++ b/test/BUILD.gn @@ -12,6 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +import("../build/crashpad_dependencies.gni") + static_library("test") { testonly = true @@ -39,7 +41,7 @@ static_library("test") { "test_paths.h", ] - if (is_posix) { + if (crashpad_is_posix) { sources += [ "multiprocess_posix.cc", "scoped_temp_dir_posix.cc", @@ -112,7 +114,7 @@ source_set("test_test") { "test_paths_test.cc", ] - if (is_posix && !is_fuchsia) { + if (crashpad_is_posix && !is_fuchsia) { sources += [ "multiprocess_posix_test.cc" ] } diff --git a/util/BUILD.gn b/util/BUILD.gn index 43d64b38..e097f2fa 100644 --- a/util/BUILD.gn +++ b/util/BUILD.gn @@ -12,9 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -if (is_mac) { - import("../build/crashpad_dependencies.gni") +import("../build/crashpad_dependencies.gni") +if (is_mac) { if (crashpad_is_in_chromium) { import("//build/config/sysroot.gni") } else { @@ -150,7 +150,7 @@ static_library("util") { "thread/worker_thread.h", ] - if (is_posix) { + if (crashpad_is_posix) { sources += [ "file/directory_reader_posix.cc", "file/file_io_posix.cc", @@ -414,7 +414,7 @@ source_set("util_test") { sources += [ "net/http_transport_test.cc" ] } - if (is_posix) { + if (crashpad_is_posix) { if (!is_fuchsia) { sources += [ "posix/process_info_test.cc",