Commit f07bed8f authored by Thomas Anderson's avatar Thomas Anderson Committed by Commit Bot

Revert "Refactor crashpad_handler binary on macOS"

This reverts commit c5a20e34.

Reason for revert: Suspected cause of breakage on Google Chrome Mac:
https://ci.chromium.org/buildbot/chromium.chrome/Google%20Chrome%20Mac/41147

Original change's description:
> Refactor crashpad_handler binary on macOS
> 
> In order to define custom UserStreamDataSources, we need a
> chromium-built crashpad_handler binary. This change refactors the
> crashpad_handler executable to be built within chromium as
> chrome_crashpad_handler and moved into it's final destination under the
> original 'crashpad_handler' name.
> 
> Bug: 912286
> Change-Id: I0f52028ae4c149823b30747589e2dd94225694c6
> Reviewed-on: https://chromium-review.googlesource.com/c/1449330
> Reviewed-by: Lei Zhang <thestig@chromium.org>
> Reviewed-by: Peter Beverloo <peter@chromium.org>
> Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
> Reviewed-by: Mark Mentovai <mark@chromium.org>
> Commit-Queue: Vlad Tsyrklevich <vtsyrklevich@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#629394}

TBR=thestig@chromium.org,peter@chromium.org,pfeldman@chromium.org,mark@chromium.org,vtsyrklevich@chromium.org

Change-Id: I3ef4f33f3ac73c56c1baf3e61287373c308ea364
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 912286
Reviewed-on: https://chromium-review.googlesource.com/c/1455655Reviewed-by: default avatarThomas Anderson <thomasanderson@chromium.org>
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#629432}
parent 4af064f6
......@@ -842,36 +842,23 @@ if (is_win) {
}
}
if (using_sanitizer) {
bundle_data("chrome_framework_helpers_asan_runtime") {
# crashpad_handler requires the ASan runtime at its @executable_path.
sources = [
"$root_out_dir/libclang_rt.asan_osx_dynamic.dylib",
]
outputs = [
"{{bundle_contents_dir}}/Helpers/{{source_file_part}}",
]
public_deps = [
"//build/config/sanitizers:copy_asan_runtime",
]
}
}
bundle_data("chrome_framework_helpers") {
sources = [
"$root_out_dir/chrome_crashpad_handler",
"$root_out_dir/crashpad_handler",
]
outputs = [
"{{bundle_contents_dir}}/Helpers/crashpad_handler",
"{{bundle_contents_dir}}/Helpers/{{source_file_part}}",
]
public_deps = [
"//components/crash/content/app:chrome_crashpad_handler",
"//third_party/crashpad/crashpad/handler:crashpad_handler",
]
if (using_sanitizer) {
public_deps += [ ":chrome_framework_helpers_asan_runtime" ]
# crashpad_handler requires the ASan runtime at its @executable_path.
sources += [ "$root_out_dir/libclang_rt.asan_osx_dynamic.dylib" ]
public_deps += [ "//build/config/sanitizers:copy_asan_runtime" ]
}
}
......@@ -1347,7 +1334,7 @@ if (is_win) {
"$root_out_dir/AlertNotificationService.xpc/Contents/MacOS/AlertNotificationService",
"$root_out_dir/$chrome_helper_name.app/Contents/MacOS/$chrome_helper_name",
"$root_out_dir/$chrome_product_full_name.app/Contents/MacOS/$chrome_product_full_name",
"$root_out_dir/$chrome_framework_name.framework/Versions/$chrome_framework_version/Helpers/crashpad_handler",
"$root_out_dir/crashpad_handler",
"$root_out_dir/libswiftshader_libEGL.dylib",
"$root_out_dir/libswiftshader_libGLESv2.dylib",
]
......@@ -1378,8 +1365,8 @@ if (is_win) {
":chrome_framework",
":chrome_helper_app",
"//chrome/browser/ui/cocoa/notifications:alert_notification_xpc_service",
"//components/crash/content/app:chrome_crashpad_handler",
"//third_party/breakpad:dump_syms",
"//third_party/crashpad/crashpad/handler:crashpad_handler",
"//third_party/swiftshader/src/OpenGL/libEGL:swiftshader_libEGL",
"//third_party/swiftshader/src/OpenGL/libGLESv2:swiftshader_libGLESv2",
]
......@@ -1418,7 +1405,7 @@ if (is_win) {
":chrome_framework",
":chrome_helper_app",
"//chrome/browser/ui/cocoa/notifications:alert_notification_xpc_service",
"//components/crash/content/app:chrome_crashpad_handler",
"//third_party/crashpad/crashpad/handler:crashpad_handler",
"//third_party/swiftshader/src/OpenGL/libEGL:swiftshader_libEGL",
"//third_party/swiftshader/src/OpenGL/libGLESv2:swiftshader_libGLESv2",
]
......
......@@ -189,42 +189,6 @@ if (is_win) {
}
}
if (is_mac) {
# We build a chromium-specific crashpad_handler executable so that we can
# define custom UserStreamDataSources. This executable is renamed to
# 'crashpad_handler' in output bundles.
executable("chrome_crashpad_handler") {
sources = [
"chrome_crashpad_handler.cc",
]
deps = [
"//third_party/crashpad/crashpad/handler:handler",
]
if (is_component_build) {
ldflags = [
# The handler is in
# Chromium.app/Contents/Versions/X/Chromium Framework.framework/Versions/A/Helpers/
# so set rpath up to the base.
"-rpath",
"@loader_path/../../../../../../../..",
# The handler is also in
# Content Shell.app/Contents/Frameworks/Content Shell Framework.framework/Versions/C/Helpers/
# so set the rpath for that too.
"-rpath",
"@loader_path/../../../../../../..",
# The handler can also be executed in an unbundled framework at
# Chromium Framework.framework/Versions/A/Helpers/
"-rpath",
"@loader_path/../../../..",
]
}
}
}
# This source set provides the functionality required for tests, which on Windows
# link the export thunks directly into the test binary.
source_set("test_support") {
......
// Copyright 2019 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.
#include "third_party/crashpad/crashpad/handler/handler_main.h"
int main(int argc, char* argv[]) {
return crashpad::HandlerMain(argc, argv, nullptr);
}
......@@ -658,13 +658,13 @@ if (is_mac) {
bundle_data("content_shell_framework_helpers") {
testonly = true
sources = [
"$root_out_dir/chrome_crashpad_handler",
"$root_out_dir/crashpad_handler",
]
outputs = [
"{{bundle_contents_dir}}/Helpers/crashpad_handler",
"{{bundle_contents_dir}}/Helpers/{{source_file_part}}",
]
public_deps = [
"//components/crash/content/app:chrome_crashpad_handler",
"//third_party/crashpad/crashpad/handler:crashpad_handler",
]
}
......
......@@ -601,51 +601,27 @@ test("headless_unittests") {
}
if (is_mac) {
copy("mac_helpers_crashpad_handler") {
copy("mac_helpers") {
sources = [
"$root_out_dir/chrome_crashpad_handler",
"$root_out_dir/crashpad_handler",
]
deps = [
"//components/crash/content/app:chrome_crashpad_handler",
"//base",
"//third_party/crashpad/crashpad/handler:crashpad_handler",
]
outputs = [
"$root_out_dir/Helpers/crashpad_handler",
]
}
if (is_component_build) {
copy("mac_helpers_libraries") {
sources = [
"$root_out_dir/libbase.dylib",
]
deps = [
"//base",
]
outputs = [
"$root_out_dir/Helpers/{{source_file_part}}",
]
if (is_component_build) {
sources += [ "$root_out_dir/libbase.dylib" ]
if (use_custom_libcxx) {
sources += [ "$root_out_dir/libc++.dylib" ]
deps += [ "//buildtools/third_party/libc++:libc++" ]
}
}
}
group("mac_helpers") {
data = [
"$root_out_dir/Helpers",
]
deps = [
":mac_helpers_crashpad_handler",
outputs = [
"$root_out_dir/Helpers/{{source_file_part}}",
]
if (is_component_build) {
deps += [ ":mac_helpers_libraries" ]
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment