Rework GN files to start to support building standalone, and also in Chromium

- Adds a .gn and a build/BUILDCONFIG.gn that uses mini_chromium's
  build/BUILD.gn.
- Adds some stub BUILD.gn files in locations where Chromium expects them
  (in //build, //testing, //third_party) containing empty targets/configs.
  These are no-ops in standalone builds, but add functionality when
  building in Chromium.  This is in preference to having a global bool
  that conditionally does Chromium-y things in the Crashpad build files.
  These stub files are all contained in a secondary source root in
  build/chromium_compatibility, referred to by //.gn.
- Adds //base/BUILD.gn which forwards to mini_chromium/base. This is
  only used when building standalone so that both Chromium and Crashpad
  can refer to it as "//base".
- Changes references to other Crashpad targets to be relatively
  specified so that they work when the root of the project is //, and also
  when it's //third_party/crashpad/crashpad as it is in Chromium.
- Moves any error-causing Mac/Win-specific files into explicit if (is_mac)
  or if (is_win) blocks as part of removing the dependency on
  set_sources_assignment_filter().

As yet unresolved:
- CRASHPAD_IN_CHROMIUM needs to be removed when standalone; to be tackled
  in a follow up.
- Not sure what to do with zlib yet, the build file currently assumes
  "in Chromium" too, and similarly having Crashpad //third_party/zlib:zlib
  pointing at itself doesn't work.

Bug: crashpad:79
Change-Id: I6a7dda214e4b3b14a60c1ed285267ab97432a1a8
Reviewed-on: https://chromium-review.googlesource.com/777410
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
This commit is contained in:
Scott Graham 2017-11-28 10:31:13 -08:00 committed by Commit Bot
parent af28b83eb7
commit 2bb56fafe3
21 changed files with 468 additions and 347 deletions

19
.gn Normal file
View File

@ -0,0 +1,19 @@
# Copyright 2017 The Crashpad Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
buildconfig = "//build/BUILDCONFIG.gn"
# This secondary source root is used to put various forwarding/stub files that
# serve to make the core build files compatible with Chromium.
secondary_source = "//build/chromium_compatibility/"

View File

@ -15,7 +15,7 @@
import("//testing/test.gni")
config("crashpad_config") {
include_dirs = [ "//third_party/crashpad/crashpad" ]
include_dirs = [ "." ]
}
test("crashpad_tests") {

66
build/BUILDCONFIG.gn Normal file
View File

@ -0,0 +1,66 @@
# Copyright 2017 The Crashpad Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
if (target_os == "") {
target_os = host_os
}
if (current_os == "") {
current_os = target_os
}
declare_args() {
is_debug = false
is_clang = current_os == "mac" || current_os == "fuchsia"
clang_root = ""
}
is_mac = false
is_win = false
is_linux = false
is_android = false
is_fuchsia = false
is_ios = false # This is necessary for third_party/zlib/zlib/BUILD.gn.
if (current_os == "mac") {
is_mac = true
} else if (current_os == "win") {
is_win = true
} else if (current_os == "android") {
is_android = true
} else if (current_os == "linux") {
is_linux = true
} else if (current_os == "fuchsia") {
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")
} else {
set_default_toolchain(
"//third_party/mini_chromium/mini_chromium/build:gcc_like_toolchain")
}
set_defaults("static_library") {
configs = [
"//third_party/mini_chromium/mini_chromium/build:default",
# This (no-op) is added here so that build files that expect to be able to
# remove it can do so without causing an error.
"//build/config/compiler:chromium_code",
]
}

View File

@ -0,0 +1,5 @@
This directory is used as a secondary GN source root for compatibility with
Chromium. Files in this subtree should match file paths that the Crashpad build
files need to refer to when building in Chromium. In the Crashpad tree, they
should either be empty/no-ops, or forward to the real Crashpad implementation
in the real tree. No actual configuration should be done in this secondary tree.

View File

@ -0,0 +1,26 @@
# Copyright 2017 The Crashpad Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# This target is a stub so that both Crashpad and Chromium can refer to "//base"
# in their build files. When building in the Chromium tree, "//base" will refer
# the "real" base, but when building standalone in Crashpad, we forward those
# references on to mini_chromium.
group("base") {
public_configs =
[ "//third_party/mini_chromium/mini_chromium/base:base_public_config" ]
public_deps = [
"//third_party/mini_chromium/mini_chromium/base",
]
}

View File

@ -0,0 +1,19 @@
# Copyright 2017 The Crashpad Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# This is a stub to match Chromium. This target is unused and has no effect when
# building standalone in Crashpad.
group("test_support") {
}

View File

@ -0,0 +1,28 @@
# Copyright 2017 The Crashpad Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# This is a stub to match Chromium. The configs in this file do not have any
# effect on the build when building standalone in Crashpad.
config("default_symbols") {
}
config("minimal_symbols") {
}
config("chromium_code") {
}
config("no_chromium_code") {
}

View File

@ -0,0 +1,16 @@
# Copyright 2017 The Crashpad Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# This is a stub to match Chromium, but is unused when building standalone in
# Crashpad.

View File

@ -0,0 +1,25 @@
# Copyright 2017 The Crashpad Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# This is a stub to match Chromium. The configs in this file do not have any
# effect on the build when building standalone in Crashpad.
group("default_exe_manifest") {
}
config("console") {
}
config("windowed") {
}

View File

@ -0,0 +1,19 @@
# Copyright 2017 The Crashpad Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# TODO(GN): This is a placeholder that matches the name of Chromium's location
# for this file. It will need to be filled out to cause a gmock dependency.
group("gmock") {
}

View File

@ -0,0 +1,19 @@
# Copyright 2017 The Crashpad Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# TODO(GN): This is a placeholder that matches the name of Chromium's location
# for this file. It will need to be filled out to cause a gtest dependency.
group("gtest") {
}

View File

@ -0,0 +1,22 @@
# Copyright 2017 The Crashpad Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
template("test") {
executable(target_name) {
deps = []
forward_variables_from(invoker, "*")
testonly = true
}
}

View File

@ -48,12 +48,12 @@ static_library("client") {
]
}
public_configs = [ "//third_party/crashpad/crashpad:crashpad_config" ]
public_configs = [ "..:crashpad_config" ]
deps = [
"../compat",
"../util",
"//base",
"//third_party/crashpad/crashpad/compat",
"//third_party/crashpad/crashpad/util",
]
if (is_win) {
@ -88,20 +88,19 @@ source_set("client_test") {
deps = [
":client",
"../compat",
"../test",
"../util",
"//base",
"//testing/gmock",
"//testing/gtest",
"//third_party/crashpad/crashpad/compat",
"//third_party/crashpad/crashpad/test",
"//third_party/crashpad/crashpad/util",
]
data_deps = [
"//third_party/crashpad/crashpad/handler:crashpad_handler",
"../handler:crashpad_handler",
]
if (is_win) {
data_deps +=
[ "//third_party/crashpad/crashpad/handler:crashpad_handler_console" ]
data_deps += [ "../handler:crashpad_handler_console" ]
}
}

View File

@ -68,7 +68,7 @@ static_library("compat") {
public_configs = [
":compat_config",
"//third_party/crashpad/crashpad:crashpad_config",
"..:crashpad_config",
]
deps = []

View File

@ -20,32 +20,42 @@ static_library("handler") {
"crash_report_upload_thread.h",
"handler_main.cc",
"handler_main.h",
"mac/crash_report_exception_handler.cc",
"mac/crash_report_exception_handler.h",
"mac/exception_handler_server.cc",
"mac/exception_handler_server.h",
"mac/file_limit_annotation.cc",
"mac/file_limit_annotation.h",
"minidump_to_upload_parameters.cc",
"minidump_to_upload_parameters.h",
"prune_crash_reports_thread.cc",
"prune_crash_reports_thread.h",
"user_stream_data_source.cc",
"user_stream_data_source.h",
]
if (is_mac) {
sources += [
"mac/crash_report_exception_handler.cc",
"mac/crash_report_exception_handler.h",
"mac/exception_handler_server.cc",
"mac/exception_handler_server.h",
"mac/file_limit_annotation.cc",
"mac/file_limit_annotation.h",
]
}
if (is_win) {
sources += [
"win/crash_report_exception_handler.cc",
"win/crash_report_exception_handler.h",
]
}
public_configs = [ "//third_party/crashpad/crashpad:crashpad_config" ]
public_configs = [ "..:crashpad_config" ]
deps = [
"../client",
"../compat",
"../minidump",
"../snapshot",
"../tools:tool_support",
"../util",
"//base",
"//third_party/crashpad/crashpad/client",
"//third_party/crashpad/crashpad/compat",
"//third_party/crashpad/crashpad/minidump",
"//third_party/crashpad/crashpad/snapshot",
"//third_party/crashpad/crashpad/tools:tool_support",
"//third_party/crashpad/crashpad/util",
]
if (is_win) {
@ -62,13 +72,13 @@ source_set("handler_test") {
deps = [
":handler",
"../client",
"../compat",
"../snapshot",
"../test",
"../util",
"//base",
"//testing/gtest",
"//third_party/crashpad/crashpad/client",
"//third_party/crashpad/crashpad/compat",
"//third_party/crashpad/crashpad/snapshot",
"//third_party/crashpad/crashpad/test",
"//third_party/crashpad/crashpad/util",
]
if (is_win) {
@ -87,9 +97,9 @@ executable("crashpad_handler") {
deps = [
":handler",
"../compat",
"//base",
"//build/win:default_exe_manifest",
"//third_party/crashpad/crashpad/compat",
]
if (is_mac && is_component_build) {
@ -123,11 +133,11 @@ executable("crashpad_handler_test_extended_handler") {
deps = [
":handler",
"../compat",
"../minidump:test_support",
"../tools:tool_support",
"//base",
"//build/win:default_exe_manifest",
"//third_party/crashpad/crashpad/compat",
"//third_party/crashpad/crashpad/minidump:test_support",
"//third_party/crashpad/crashpad/tools:tool_support",
]
}
@ -144,9 +154,9 @@ if (is_win) {
deps = [
":handler",
"../compat",
"//base",
"//build/win:default_exe_manifest",
"//third_party/crashpad/crashpad/compat",
]
}

View File

@ -69,16 +69,16 @@ static_library("minidump") {
"minidump_writer_util.h",
]
public_configs = [ "//third_party/crashpad/crashpad:crashpad_config" ]
public_configs = [ "..:crashpad_config" ]
public_deps = [
"//third_party/crashpad/crashpad/compat",
"../compat",
]
deps = [
"../snapshot",
"../util",
"//base",
"//third_party/crashpad/crashpad/snapshot",
"//third_party/crashpad/crashpad/util",
]
if (is_win) {
@ -111,7 +111,7 @@ static_library("test_support") {
"test/minidump_writable_test_util.h",
]
public_configs = [ "//third_party/crashpad/crashpad:crashpad_config" ]
public_configs = [ "..:crashpad_config" ]
public_deps = [
":minidump",
@ -156,11 +156,11 @@ source_set("minidump_test") {
deps = [
":test_support",
"../snapshot:test_support",
"../test",
"../util",
"//base",
"//testing/gtest",
"//third_party/crashpad/crashpad/snapshot:test_support",
"//third_party/crashpad/crashpad/test",
"//third_party/crashpad/crashpad/util",
]
if (is_win) {

View File

@ -125,13 +125,13 @@ static_library("snapshot") {
]
}
public_configs = [ "//third_party/crashpad/crashpad:crashpad_config" ]
public_configs = [ "..:crashpad_config" ]
deps = [
"../client",
"../compat",
"../util",
"//base",
"//third_party/crashpad/crashpad/client",
"//third_party/crashpad/crashpad/compat",
"//third_party/crashpad/crashpad/util",
]
if (is_win) {
@ -147,15 +147,15 @@ if (is_win) {
"api/module_annotations_win.h",
]
public_configs = [ "//third_party/crashpad/crashpad:crashpad_config" ]
public_configs = [ "..:crashpad_config" ]
cflags = [ "/wd4201" ]
deps = [
":snapshot",
"../compat",
"../util",
"//base",
"//third_party/crashpad/crashpad/compat",
"//third_party/crashpad/crashpad/util",
]
}
} else {
@ -185,16 +185,16 @@ static_library("test_support") {
"test/test_thread_snapshot.h",
]
public_configs = [ "//third_party/crashpad/crashpad:crashpad_config" ]
public_configs = [ "..:crashpad_config" ]
public_deps = [
":snapshot",
]
deps = [
"../compat",
"../util",
"//base",
"//third_party/crashpad/crashpad/compat",
"//third_party/crashpad/crashpad/util",
]
if (is_win) {
@ -235,12 +235,12 @@ source_set("snapshot_test") {
deps = [
":snapshot_api",
":test_support",
"../client",
"../compat",
"../test",
"../util",
"//base",
"//testing/gtest",
"//third_party/crashpad/crashpad/client",
"//third_party/crashpad/crashpad/compat",
"//third_party/crashpad/crashpad/test",
"//third_party/crashpad/crashpad/util",
]
data_deps = [
@ -278,8 +278,8 @@ loadable_module("crashpad_snapshot_test_module") {
"crashpad_info_client_options_test_module.cc",
]
deps = [
"../client",
"//base",
"//third_party/crashpad/crashpad/client",
]
}
@ -328,9 +328,9 @@ if (is_win) {
"win/crashpad_snapshot_test_annotations.cc",
]
deps = [
"../client",
"../compat",
"//base",
"//third_party/crashpad/crashpad/client",
"//third_party/crashpad/crashpad/compat",
]
}
@ -340,10 +340,10 @@ if (is_win) {
"win/crashpad_snapshot_test_crashing_child.cc",
]
deps = [
"../client",
"../compat",
"../util",
"//base",
"//third_party/crashpad/crashpad/client",
"//third_party/crashpad/crashpad/compat",
"//third_party/crashpad/crashpad/util",
]
}
@ -353,10 +353,10 @@ if (is_win) {
"win/crashpad_snapshot_test_dump_without_crashing.cc",
]
deps = [
"../client",
"../compat",
"../util",
"//base",
"//third_party/crashpad/crashpad/client",
"//third_party/crashpad/crashpad/compat",
"//third_party/crashpad/crashpad/util",
]
}
@ -366,9 +366,9 @@ if (is_win) {
"win/crashpad_snapshot_test_extra_memory_ranges.cc",
]
deps = [
"../client",
"../compat",
"//base",
"//third_party/crashpad/crashpad/client",
"//third_party/crashpad/crashpad/compat",
]
}
@ -378,10 +378,10 @@ if (is_win) {
"win/crashpad_snapshot_test_image_reader.cc",
]
deps = [
"../client",
"../compat",
"../util",
"//base",
"//third_party/crashpad/crashpad/client",
"//third_party/crashpad/crashpad/compat",
"//third_party/crashpad/crashpad/util",
]
if (symbol_level == 0) {
# The tests that use this executable rely on at least minimal debug info.
@ -396,8 +396,8 @@ if (is_win) {
"win/crashpad_snapshot_test_image_reader_module.cc",
]
deps = [
"../client",
"//base",
"//third_party/crashpad/crashpad/client",
]
if (symbol_level == 0) {
# The tests that use this module rely on at least minimal debug info.

View File

@ -1,155 +0,0 @@
# Copyright 2017 The Crashpad Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//testing/test.gni")
static_library("test") {
testonly = true
sources = [
"errors.cc",
"errors.h",
"file.cc",
"file.h",
"filesystem.cc",
"filesystem.h",
"gtest_death_check.h",
"gtest_disabled.cc",
"gtest_disabled.h",
"hex_string.cc",
"hex_string.h",
"mac/dyld.cc",
"mac/dyld.h",
"mac/mach_errors.cc",
"mac/mach_errors.h",
"mac/mach_multiprocess.cc",
"mac/mach_multiprocess.h",
"main_arguments.cc",
"main_arguments.h",
"multiprocess.h",
"multiprocess_exec.h",
"multiprocess_exec_posix.cc",
"multiprocess_exec_win.cc",
"multiprocess_posix.cc",
"scoped_module_handle.cc",
"scoped_module_handle.h",
"scoped_temp_dir.cc",
"scoped_temp_dir.h",
"scoped_temp_dir_posix.cc",
"scoped_temp_dir_win.cc",
"test_paths.cc",
"test_paths.h",
"win/child_launcher.cc",
"win/child_launcher.h",
"win/win_child_process.cc",
"win/win_child_process.h",
"win/win_multiprocess.cc",
"win/win_multiprocess.h",
"win/win_multiprocess_with_temp_dir.cc",
"win/win_multiprocess_with_temp_dir.h",
]
public_configs = [ "//third_party/crashpad/crashpad:crashpad_config" ]
defines = [ "CRASHPAD_IN_CHROMIUM" ]
data = [
"test_paths_test_data_root.txt",
]
deps = [
"//base",
"//testing/gtest",
"//third_party/crashpad/crashpad/compat",
"//third_party/crashpad/crashpad/snapshot",
"//third_party/crashpad/crashpad/util",
]
if (is_mac) {
libs = [ "bsm" ]
}
}
source_set("test_test") {
testonly = true
sources = [
"hex_string_test.cc",
"mac/mach_multiprocess_test.cc",
"main_arguments_test.cc",
"multiprocess_exec_test.cc",
"scoped_temp_dir_test.cc",
"test_paths_test.cc",
"win/win_child_process_test.cc",
"win/win_multiprocess_test.cc",
]
if (!is_win) {
sources += [ "multiprocess_posix_test.cc" ]
}
deps = [
":test",
"//base",
"//testing/gmock",
"//testing/gtest",
"//third_party/crashpad/crashpad/compat",
"//third_party/crashpad/crashpad/util",
]
data_deps = [
":crashpad_test_test_multiprocess_exec_test_child",
]
}
executable("crashpad_test_test_multiprocess_exec_test_child") {
sources = [
"multiprocess_exec_test_child.cc",
]
}
static_library("gmock_main") {
testonly = true
sources = [
"gtest_main.cc",
]
defines = [
"CRASHPAD_IN_CHROMIUM",
"CRASHPAD_TEST_LAUNCHER_GMOCK",
]
deps = [
":test",
"//base",
"//base/test:test_support",
"//testing/gmock",
"//testing/gtest",
]
}
static_library("gtest_main") {
testonly = true
sources = [
"gtest_main.cc",
]
defines = [
"CRASHPAD_IN_CHROMIUM",
"CRASHPAD_TEST_LAUNCHER_GTEST",
]
deps = [
":test",
"//base",
"//base/test:test_support",
"//testing/gtest",
]
}

View File

@ -62,7 +62,7 @@ static_library("test") {
"win/win_multiprocess_with_temp_dir.h",
]
public_configs = [ "//third_party/crashpad/crashpad:crashpad_config" ]
public_configs = [ "..:crashpad_config" ]
defines = [ "CRASHPAD_IN_CHROMIUM" ]
@ -71,11 +71,11 @@ static_library("test") {
]
deps = [
"../compat",
"../snapshot",
"../util",
"//base",
"//testing/gtest",
"//third_party/crashpad/crashpad/compat",
"//third_party/crashpad/crashpad/snapshot",
"//third_party/crashpad/crashpad/util",
]
if (is_mac) {
@ -104,11 +104,11 @@ source_set("test_test") {
deps = [
":test",
"../compat",
"../util",
"//base",
"//testing/gmock",
"//testing/gtest",
"//third_party/crashpad/crashpad/compat",
"//third_party/crashpad/crashpad/util",
]
data_deps = [

View File

@ -18,7 +18,7 @@ source_set("tool_support") {
"tool_support.h",
]
public_configs = [ "//third_party/crashpad/crashpad:crashpad_config" ]
public_configs = [ "..:crashpad_config" ]
deps = [
"//base",
@ -32,11 +32,11 @@ executable("crashpad_database_util") {
deps = [
":tool_support",
"../client",
"../compat",
"../util",
"//base",
"//build/win:default_exe_manifest",
"//third_party/crashpad/crashpad/client",
"//third_party/crashpad/crashpad/compat",
"//third_party/crashpad/crashpad/util",
]
}
@ -47,10 +47,10 @@ executable("crashpad_http_upload") {
deps = [
":tool_support",
"../compat",
"../util",
"//base",
"//build/win:default_exe_manifest",
"//third_party/crashpad/crashpad/compat",
"//third_party/crashpad/crashpad/util",
]
}
@ -61,12 +61,12 @@ executable("generate_dump") {
deps = [
":tool_support",
"../compat",
"../minidump",
"../snapshot",
"../util",
"//base",
"//build/win:default_exe_manifest",
"//third_party/crashpad/crashpad/compat",
"//third_party/crashpad/crashpad/minidump",
"//third_party/crashpad/crashpad/snapshot",
"//third_party/crashpad/crashpad/util",
]
if (is_mac) {
@ -96,9 +96,9 @@ if (is_mac) {
deps = [
":tool_support",
"../compat",
"../util",
"//base",
"//third_party/crashpad/crashpad/compat",
"//third_party/crashpad/crashpad/util",
]
}
@ -121,9 +121,9 @@ if (is_mac) {
deps = [
":tool_support",
"../compat",
"../util",
"//base",
"//third_party/crashpad/crashpad/compat",
"//third_party/crashpad/crashpad/util",
]
}
@ -139,9 +139,9 @@ if (is_mac) {
deps = [
":tool_support",
"../compat",
"../util",
"//base",
"//third_party/crashpad/crashpad/compat",
"//third_party/crashpad/crashpad/util",
]
}
@ -152,10 +152,10 @@ if (is_mac) {
deps = [
":tool_support",
"../client",
"../compat",
"../util",
"//base",
"//third_party/crashpad/crashpad/client",
"//third_party/crashpad/crashpad/compat",
"//third_party/crashpad/crashpad/util",
]
}
}

View File

@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import("//build/config/sanitizers/sanitizers.gni")
import("//build/toolchain/toolchain.gni")
import("//testing/test.gni")
if (is_mac) {
@ -61,11 +59,9 @@ static_library("util") {
"file/delimited_file_reader.h",
"file/directory_reader.h",
"file/directory_reader_posix.cc",
"file/directory_reader_win.cc",
"file/file_io.cc",
"file/file_io.h",
"file/file_io_posix.cc",
"file/file_io_win.cc",
"file/file_reader.cc",
"file/file_reader.h",
"file/file_seeker.cc",
@ -74,28 +70,16 @@ static_library("util") {
"file/file_writer.h",
"file/filesystem.h",
"file/filesystem_posix.cc",
"file/filesystem_win.cc",
"file/scoped_remove_file.cc",
"file/scoped_remove_file.h",
"file/string_file.cc",
"file/string_file.h",
"mac/checked_mach_address_range.h",
"mac/launchd.h",
"mac/launchd.mm",
"mac/mac_util.cc",
"mac/mac_util.h",
"mac/service_management.cc",
"mac/service_management.h",
"mac/xattr.cc",
"mac/xattr.h",
"misc/address_sanitizer.h",
"misc/address_types.h",
"misc/arraysize_unsafe.h",
"misc/as_underlying_type.h",
"misc/clock.h",
"misc/clock_mac.cc",
"misc/clock_posix.cc",
"misc/clock_win.cc",
"misc/from_pointer_cast.h",
"misc/implicit_cast.h",
"misc/initialization_state.h",
@ -106,8 +90,6 @@ static_library("util") {
"misc/metrics.cc",
"misc/metrics.h",
"misc/paths.h",
"misc/paths_mac.cc",
"misc/paths_win.cc",
"misc/pdb_structures.cc",
"misc/pdb_structures.h",
"misc/random_string.cc",
@ -119,7 +101,6 @@ static_library("util") {
"misc/symbolic_constants_common.h",
"misc/time.cc",
"misc/time.h",
"misc/time_win.cc",
"misc/tri_state.h",
"misc/uuid.cc",
"misc/uuid.h",
@ -134,8 +115,6 @@ static_library("util") {
"net/http_multipart_builder.h",
"net/http_transport.cc",
"net/http_transport.h",
"net/http_transport_mac.mm",
"net/http_transport_win.cc",
"net/url.cc",
"net/url.h",
"numeric/checked_address_range.cc",
@ -154,7 +133,6 @@ static_library("util") {
"posix/drop_privileges.cc",
"posix/drop_privileges.h",
"posix/process_info.h",
"posix/process_info_mac.cc",
"posix/scoped_dir.cc",
"posix/scoped_dir.h",
"posix/scoped_mmap.cc",
@ -177,17 +155,80 @@ static_library("util") {
"string/split_string.cc",
"string/split_string.h",
"synchronization/semaphore.h",
"synchronization/semaphore_mac.cc",
"synchronization/semaphore_posix.cc",
"synchronization/semaphore_win.cc",
"thread/thread.cc",
"thread/thread.h",
"thread/thread_log_messages.cc",
"thread/thread_log_messages.h",
"thread/thread_posix.cc",
"thread/thread_win.cc",
"thread/worker_thread.cc",
"thread/worker_thread.h",
]
if (is_mac) {
sources += [
"mac/checked_mach_address_range.h",
"mac/launchd.h",
"mac/launchd.mm",
"mac/mac_util.cc",
"mac/mac_util.h",
"mac/service_management.cc",
"mac/service_management.h",
"mac/xattr.cc",
"mac/xattr.h",
"mach/child_port_handshake.cc",
"mach/child_port_handshake.h",
"mach/child_port_server.cc",
"mach/child_port_server.h",
"mach/child_port_types.h",
"mach/composite_mach_message_server.cc",
"mach/composite_mach_message_server.h",
"mach/exc_client_variants.cc",
"mach/exc_client_variants.h",
"mach/exc_server_variants.cc",
"mach/exc_server_variants.h",
"mach/exception_behaviors.cc",
"mach/exception_behaviors.h",
"mach/exception_ports.cc",
"mach/exception_ports.h",
"mach/exception_types.cc",
"mach/exception_types.h",
"mach/mach_extensions.cc",
"mach/mach_extensions.h",
"mach/mach_message.cc",
"mach/mach_message.h",
"mach/mach_message_server.cc",
"mach/mach_message_server.h",
"mach/notify_server.cc",
"mach/notify_server.h",
"mach/scoped_task_suspend.cc",
"mach/scoped_task_suspend.h",
"mach/symbolic_constants_mach.cc",
"mach/symbolic_constants_mach.h",
"mach/task_for_pid.cc",
"mach/task_for_pid.h",
"mach/task_memory.cc",
"mach/task_memory.h",
"misc/clock_mac.cc",
"misc/paths_mac.cc",
"net/http_transport_mac.mm",
"posix/process_info_mac.cc",
"synchronization/semaphore_mac.cc",
]
sources += get_target_outputs(":mig")
}
if (is_win) {
sources += [
"file/directory_reader_win.cc",
"file/file_io_win.cc",
"file/filesystem_win.cc",
"misc/clock_win.cc",
"misc/paths_win.cc",
"misc/time_win.cc",
"net/http_transport_win.cc",
"synchronization/semaphore_win.cc",
"thread/thread_win.cc",
"win/address_types.h",
"win/capture_context.h",
"win/checked_win_address_range.h",
@ -231,50 +272,6 @@ static_library("util") {
"win/xp_compat.h",
]
if (is_mac) {
# mach/ are not globally filtered.
sources += [
"mach/child_port_handshake.cc",
"mach/child_port_handshake.h",
"mach/child_port_server.cc",
"mach/child_port_server.h",
"mach/child_port_types.h",
"mach/composite_mach_message_server.cc",
"mach/composite_mach_message_server.h",
"mach/exc_client_variants.cc",
"mach/exc_client_variants.h",
"mach/exc_server_variants.cc",
"mach/exc_server_variants.h",
"mach/exception_behaviors.cc",
"mach/exception_behaviors.h",
"mach/exception_ports.cc",
"mach/exception_ports.h",
"mach/exception_types.cc",
"mach/exception_types.h",
"mach/mach_extensions.cc",
"mach/mach_extensions.h",
"mach/mach_message.cc",
"mach/mach_message.h",
"mach/mach_message_server.cc",
"mach/mach_message_server.h",
"mach/notify_server.cc",
"mach/notify_server.h",
"mach/scoped_task_suspend.cc",
"mach/scoped_task_suspend.h",
"mach/symbolic_constants_mach.cc",
"mach/symbolic_constants_mach.h",
"mach/task_for_pid.cc",
"mach/task_for_pid.h",
"mach/task_memory.cc",
"mach/task_memory.h",
]
}
if (is_mac) {
sources += get_target_outputs(":mig")
}
if (is_win) {
# There's no ml.exe yet in cross builds, so provide broken-but-not-asm
# versions of the functions defined in .asm files.
#
@ -298,18 +295,20 @@ static_library("util") {
}
}
public_configs = [ "//third_party/crashpad/crashpad:crashpad_config" ]
public_configs = [ "..:crashpad_config" ]
# Include files from here and generated files starting with "util".
include_dirs = [ "$root_gen_dir/third_party/crashpad/crashpad" ]
public_deps = [
"//third_party/crashpad/crashpad/compat",
"../compat",
]
deps = [
"//base",
"//third_party/crashpad/crashpad/third_party/zlib",
# TODO(GN): Should this point at Chromium's zlib when in Chromium?
"../third_party/zlib",
]
if (is_mac) {
@ -345,10 +344,6 @@ source_set("util_test") {
"file/file_reader_test.cc",
"file/filesystem_test.cc",
"file/string_file_test.cc",
"mac/launchd_test.mm",
"mac/mac_util_test.mm",
"mac/service_management_test.mm",
"mac/xattr_test.cc",
"misc/arraysize_unsafe_test.cc",
"misc/clock_test.cc",
"misc/from_pointer_cast_test.cc",
@ -386,23 +381,14 @@ source_set("util_test") {
"thread/thread_log_messages_test.cc",
"thread/thread_test.cc",
"thread/worker_thread_test.cc",
"win/capture_context_test.cc",
"win/command_line_test.cc",
"win/critical_section_with_debug_info_test.cc",
"win/exception_handler_server_test.cc",
"win/get_function_test.cc",
"win/handle_test.cc",
"win/initial_client_data_test.cc",
"win/process_info_test.cc",
"win/registration_protocol_win_test.cc",
"win/safe_terminate_process_test.cc",
"win/scoped_process_suspend_test.cc",
"win/session_end_watcher_test.cc",
]
if (is_mac) {
# mach/ are not globally filtered.
sources += [
"mac/launchd_test.mm",
"mac/mac_util_test.mm",
"mac/service_management_test.mm",
"mac/xattr_test.cc",
"mach/child_port_handshake_test.cc",
"mach/child_port_server_test.cc",
"mach/composite_mach_message_server_test.cc",
@ -421,6 +407,23 @@ source_set("util_test") {
]
}
if (is_win) {
sources += [
"win/capture_context_test.cc",
"win/command_line_test.cc",
"win/critical_section_with_debug_info_test.cc",
"win/exception_handler_server_test.cc",
"win/get_function_test.cc",
"win/handle_test.cc",
"win/initial_client_data_test.cc",
"win/process_info_test.cc",
"win/registration_protocol_win_test.cc",
"win/safe_terminate_process_test.cc",
"win/scoped_process_suspend_test.cc",
"win/session_end_watcher_test.cc",
]
}
data = [
"net/http_transport_test_server.py",
"net/testdata/",
@ -428,13 +431,13 @@ source_set("util_test") {
deps = [
":util",
"../client",
"../compat",
"../test",
"../third_party/zlib",
"//base",
"//testing/gmock",
"//testing/gtest",
"//third_party/crashpad/crashpad/client",
"//third_party/crashpad/crashpad/compat",
"//third_party/crashpad/crashpad/test",
"//third_party/crashpad/crashpad/third_party/zlib",
]
if (is_mac) {