mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-09 22:26:06 +00:00
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:
parent
af28b83eb7
commit
2bb56fafe3
19
.gn
Normal file
19
.gn
Normal 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/"
|
2
BUILD.gn
2
BUILD.gn
@ -15,7 +15,7 @@
|
|||||||
import("//testing/test.gni")
|
import("//testing/test.gni")
|
||||||
|
|
||||||
config("crashpad_config") {
|
config("crashpad_config") {
|
||||||
include_dirs = [ "//third_party/crashpad/crashpad" ]
|
include_dirs = [ "." ]
|
||||||
}
|
}
|
||||||
|
|
||||||
test("crashpad_tests") {
|
test("crashpad_tests") {
|
||||||
|
66
build/BUILDCONFIG.gn
Normal file
66
build/BUILDCONFIG.gn
Normal 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",
|
||||||
|
]
|
||||||
|
}
|
5
build/chromium_compatibility/README.crashpad
Normal file
5
build/chromium_compatibility/README.crashpad
Normal 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.
|
26
build/chromium_compatibility/base/BUILD.gn
Normal file
26
build/chromium_compatibility/base/BUILD.gn
Normal 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",
|
||||||
|
]
|
||||||
|
}
|
19
build/chromium_compatibility/base/test/BUILD.gn
Normal file
19
build/chromium_compatibility/base/test/BUILD.gn
Normal 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") {
|
||||||
|
}
|
28
build/chromium_compatibility/build/config/compiler/BUILD.gn
Normal file
28
build/chromium_compatibility/build/config/compiler/BUILD.gn
Normal 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") {
|
||||||
|
}
|
@ -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.
|
25
build/chromium_compatibility/build/win/BUILD.gn
Normal file
25
build/chromium_compatibility/build/win/BUILD.gn
Normal 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") {
|
||||||
|
}
|
19
build/chromium_compatibility/testing/gmock/BUILD.gn
Normal file
19
build/chromium_compatibility/testing/gmock/BUILD.gn
Normal 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") {
|
||||||
|
}
|
19
build/chromium_compatibility/testing/gtest/BUILD.gn
Normal file
19
build/chromium_compatibility/testing/gtest/BUILD.gn
Normal 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") {
|
||||||
|
}
|
22
build/chromium_compatibility/testing/test.gni
Normal file
22
build/chromium_compatibility/testing/test.gni
Normal 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
|
||||||
|
}
|
||||||
|
}
|
@ -48,12 +48,12 @@ static_library("client") {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
public_configs = [ "//third_party/crashpad/crashpad:crashpad_config" ]
|
public_configs = [ "..:crashpad_config" ]
|
||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
|
"../compat",
|
||||||
|
"../util",
|
||||||
"//base",
|
"//base",
|
||||||
"//third_party/crashpad/crashpad/compat",
|
|
||||||
"//third_party/crashpad/crashpad/util",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if (is_win) {
|
if (is_win) {
|
||||||
@ -88,20 +88,19 @@ source_set("client_test") {
|
|||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
":client",
|
":client",
|
||||||
|
"../compat",
|
||||||
|
"../test",
|
||||||
|
"../util",
|
||||||
"//base",
|
"//base",
|
||||||
"//testing/gmock",
|
"//testing/gmock",
|
||||||
"//testing/gtest",
|
"//testing/gtest",
|
||||||
"//third_party/crashpad/crashpad/compat",
|
|
||||||
"//third_party/crashpad/crashpad/test",
|
|
||||||
"//third_party/crashpad/crashpad/util",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
data_deps = [
|
data_deps = [
|
||||||
"//third_party/crashpad/crashpad/handler:crashpad_handler",
|
"../handler:crashpad_handler",
|
||||||
]
|
]
|
||||||
|
|
||||||
if (is_win) {
|
if (is_win) {
|
||||||
data_deps +=
|
data_deps += [ "../handler:crashpad_handler_console" ]
|
||||||
[ "//third_party/crashpad/crashpad/handler:crashpad_handler_console" ]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -68,7 +68,7 @@ static_library("compat") {
|
|||||||
|
|
||||||
public_configs = [
|
public_configs = [
|
||||||
":compat_config",
|
":compat_config",
|
||||||
"//third_party/crashpad/crashpad:crashpad_config",
|
"..:crashpad_config",
|
||||||
]
|
]
|
||||||
|
|
||||||
deps = []
|
deps = []
|
||||||
|
@ -20,32 +20,42 @@ static_library("handler") {
|
|||||||
"crash_report_upload_thread.h",
|
"crash_report_upload_thread.h",
|
||||||
"handler_main.cc",
|
"handler_main.cc",
|
||||||
"handler_main.h",
|
"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.cc",
|
||||||
"minidump_to_upload_parameters.h",
|
"minidump_to_upload_parameters.h",
|
||||||
"prune_crash_reports_thread.cc",
|
"prune_crash_reports_thread.cc",
|
||||||
"prune_crash_reports_thread.h",
|
"prune_crash_reports_thread.h",
|
||||||
"user_stream_data_source.cc",
|
"user_stream_data_source.cc",
|
||||||
"user_stream_data_source.h",
|
"user_stream_data_source.h",
|
||||||
"win/crash_report_exception_handler.cc",
|
|
||||||
"win/crash_report_exception_handler.h",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
public_configs = [ "//third_party/crashpad/crashpad:crashpad_config" ]
|
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 = [ "..:crashpad_config" ]
|
||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
|
"../client",
|
||||||
|
"../compat",
|
||||||
|
"../minidump",
|
||||||
|
"../snapshot",
|
||||||
|
"../tools:tool_support",
|
||||||
|
"../util",
|
||||||
"//base",
|
"//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) {
|
if (is_win) {
|
||||||
@ -62,13 +72,13 @@ source_set("handler_test") {
|
|||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
":handler",
|
":handler",
|
||||||
|
"../client",
|
||||||
|
"../compat",
|
||||||
|
"../snapshot",
|
||||||
|
"../test",
|
||||||
|
"../util",
|
||||||
"//base",
|
"//base",
|
||||||
"//testing/gtest",
|
"//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) {
|
if (is_win) {
|
||||||
@ -87,9 +97,9 @@ executable("crashpad_handler") {
|
|||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
":handler",
|
":handler",
|
||||||
|
"../compat",
|
||||||
"//base",
|
"//base",
|
||||||
"//build/win:default_exe_manifest",
|
"//build/win:default_exe_manifest",
|
||||||
"//third_party/crashpad/crashpad/compat",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if (is_mac && is_component_build) {
|
if (is_mac && is_component_build) {
|
||||||
@ -123,11 +133,11 @@ executable("crashpad_handler_test_extended_handler") {
|
|||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
":handler",
|
":handler",
|
||||||
|
"../compat",
|
||||||
|
"../minidump:test_support",
|
||||||
|
"../tools:tool_support",
|
||||||
"//base",
|
"//base",
|
||||||
"//build/win:default_exe_manifest",
|
"//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 = [
|
deps = [
|
||||||
":handler",
|
":handler",
|
||||||
|
"../compat",
|
||||||
"//base",
|
"//base",
|
||||||
"//build/win:default_exe_manifest",
|
"//build/win:default_exe_manifest",
|
||||||
"//third_party/crashpad/crashpad/compat",
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,16 +69,16 @@ static_library("minidump") {
|
|||||||
"minidump_writer_util.h",
|
"minidump_writer_util.h",
|
||||||
]
|
]
|
||||||
|
|
||||||
public_configs = [ "//third_party/crashpad/crashpad:crashpad_config" ]
|
public_configs = [ "..:crashpad_config" ]
|
||||||
|
|
||||||
public_deps = [
|
public_deps = [
|
||||||
"//third_party/crashpad/crashpad/compat",
|
"../compat",
|
||||||
]
|
]
|
||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
|
"../snapshot",
|
||||||
|
"../util",
|
||||||
"//base",
|
"//base",
|
||||||
"//third_party/crashpad/crashpad/snapshot",
|
|
||||||
"//third_party/crashpad/crashpad/util",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if (is_win) {
|
if (is_win) {
|
||||||
@ -111,7 +111,7 @@ static_library("test_support") {
|
|||||||
"test/minidump_writable_test_util.h",
|
"test/minidump_writable_test_util.h",
|
||||||
]
|
]
|
||||||
|
|
||||||
public_configs = [ "//third_party/crashpad/crashpad:crashpad_config" ]
|
public_configs = [ "..:crashpad_config" ]
|
||||||
|
|
||||||
public_deps = [
|
public_deps = [
|
||||||
":minidump",
|
":minidump",
|
||||||
@ -156,11 +156,11 @@ source_set("minidump_test") {
|
|||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
":test_support",
|
":test_support",
|
||||||
|
"../snapshot:test_support",
|
||||||
|
"../test",
|
||||||
|
"../util",
|
||||||
"//base",
|
"//base",
|
||||||
"//testing/gtest",
|
"//testing/gtest",
|
||||||
"//third_party/crashpad/crashpad/snapshot:test_support",
|
|
||||||
"//third_party/crashpad/crashpad/test",
|
|
||||||
"//third_party/crashpad/crashpad/util",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if (is_win) {
|
if (is_win) {
|
||||||
|
@ -125,13 +125,13 @@ static_library("snapshot") {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
public_configs = [ "//third_party/crashpad/crashpad:crashpad_config" ]
|
public_configs = [ "..:crashpad_config" ]
|
||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
|
"../client",
|
||||||
|
"../compat",
|
||||||
|
"../util",
|
||||||
"//base",
|
"//base",
|
||||||
"//third_party/crashpad/crashpad/client",
|
|
||||||
"//third_party/crashpad/crashpad/compat",
|
|
||||||
"//third_party/crashpad/crashpad/util",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if (is_win) {
|
if (is_win) {
|
||||||
@ -147,15 +147,15 @@ if (is_win) {
|
|||||||
"api/module_annotations_win.h",
|
"api/module_annotations_win.h",
|
||||||
]
|
]
|
||||||
|
|
||||||
public_configs = [ "//third_party/crashpad/crashpad:crashpad_config" ]
|
public_configs = [ "..:crashpad_config" ]
|
||||||
|
|
||||||
cflags = [ "/wd4201" ]
|
cflags = [ "/wd4201" ]
|
||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
":snapshot",
|
":snapshot",
|
||||||
|
"../compat",
|
||||||
|
"../util",
|
||||||
"//base",
|
"//base",
|
||||||
"//third_party/crashpad/crashpad/compat",
|
|
||||||
"//third_party/crashpad/crashpad/util",
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -185,16 +185,16 @@ static_library("test_support") {
|
|||||||
"test/test_thread_snapshot.h",
|
"test/test_thread_snapshot.h",
|
||||||
]
|
]
|
||||||
|
|
||||||
public_configs = [ "//third_party/crashpad/crashpad:crashpad_config" ]
|
public_configs = [ "..:crashpad_config" ]
|
||||||
|
|
||||||
public_deps = [
|
public_deps = [
|
||||||
":snapshot",
|
":snapshot",
|
||||||
]
|
]
|
||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
|
"../compat",
|
||||||
|
"../util",
|
||||||
"//base",
|
"//base",
|
||||||
"//third_party/crashpad/crashpad/compat",
|
|
||||||
"//third_party/crashpad/crashpad/util",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if (is_win) {
|
if (is_win) {
|
||||||
@ -235,12 +235,12 @@ source_set("snapshot_test") {
|
|||||||
deps = [
|
deps = [
|
||||||
":snapshot_api",
|
":snapshot_api",
|
||||||
":test_support",
|
":test_support",
|
||||||
|
"../client",
|
||||||
|
"../compat",
|
||||||
|
"../test",
|
||||||
|
"../util",
|
||||||
"//base",
|
"//base",
|
||||||
"//testing/gtest",
|
"//testing/gtest",
|
||||||
"//third_party/crashpad/crashpad/client",
|
|
||||||
"//third_party/crashpad/crashpad/compat",
|
|
||||||
"//third_party/crashpad/crashpad/test",
|
|
||||||
"//third_party/crashpad/crashpad/util",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
data_deps = [
|
data_deps = [
|
||||||
@ -278,8 +278,8 @@ loadable_module("crashpad_snapshot_test_module") {
|
|||||||
"crashpad_info_client_options_test_module.cc",
|
"crashpad_info_client_options_test_module.cc",
|
||||||
]
|
]
|
||||||
deps = [
|
deps = [
|
||||||
|
"../client",
|
||||||
"//base",
|
"//base",
|
||||||
"//third_party/crashpad/crashpad/client",
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -328,9 +328,9 @@ if (is_win) {
|
|||||||
"win/crashpad_snapshot_test_annotations.cc",
|
"win/crashpad_snapshot_test_annotations.cc",
|
||||||
]
|
]
|
||||||
deps = [
|
deps = [
|
||||||
|
"../client",
|
||||||
|
"../compat",
|
||||||
"//base",
|
"//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",
|
"win/crashpad_snapshot_test_crashing_child.cc",
|
||||||
]
|
]
|
||||||
deps = [
|
deps = [
|
||||||
|
"../client",
|
||||||
|
"../compat",
|
||||||
|
"../util",
|
||||||
"//base",
|
"//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",
|
"win/crashpad_snapshot_test_dump_without_crashing.cc",
|
||||||
]
|
]
|
||||||
deps = [
|
deps = [
|
||||||
|
"../client",
|
||||||
|
"../compat",
|
||||||
|
"../util",
|
||||||
"//base",
|
"//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",
|
"win/crashpad_snapshot_test_extra_memory_ranges.cc",
|
||||||
]
|
]
|
||||||
deps = [
|
deps = [
|
||||||
|
"../client",
|
||||||
|
"../compat",
|
||||||
"//base",
|
"//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",
|
"win/crashpad_snapshot_test_image_reader.cc",
|
||||||
]
|
]
|
||||||
deps = [
|
deps = [
|
||||||
|
"../client",
|
||||||
|
"../compat",
|
||||||
|
"../util",
|
||||||
"//base",
|
"//base",
|
||||||
"//third_party/crashpad/crashpad/client",
|
|
||||||
"//third_party/crashpad/crashpad/compat",
|
|
||||||
"//third_party/crashpad/crashpad/util",
|
|
||||||
]
|
]
|
||||||
if (symbol_level == 0) {
|
if (symbol_level == 0) {
|
||||||
# The tests that use this executable rely on at least minimal debug info.
|
# 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",
|
"win/crashpad_snapshot_test_image_reader_module.cc",
|
||||||
]
|
]
|
||||||
deps = [
|
deps = [
|
||||||
|
"../client",
|
||||||
"//base",
|
"//base",
|
||||||
"//third_party/crashpad/crashpad/client",
|
|
||||||
]
|
]
|
||||||
if (symbol_level == 0) {
|
if (symbol_level == 0) {
|
||||||
# The tests that use this module rely on at least minimal debug info.
|
# The tests that use this module rely on at least minimal debug info.
|
||||||
|
@ -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",
|
|
||||||
]
|
|
||||||
}
|
|
@ -62,7 +62,7 @@ static_library("test") {
|
|||||||
"win/win_multiprocess_with_temp_dir.h",
|
"win/win_multiprocess_with_temp_dir.h",
|
||||||
]
|
]
|
||||||
|
|
||||||
public_configs = [ "//third_party/crashpad/crashpad:crashpad_config" ]
|
public_configs = [ "..:crashpad_config" ]
|
||||||
|
|
||||||
defines = [ "CRASHPAD_IN_CHROMIUM" ]
|
defines = [ "CRASHPAD_IN_CHROMIUM" ]
|
||||||
|
|
||||||
@ -71,11 +71,11 @@ static_library("test") {
|
|||||||
]
|
]
|
||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
|
"../compat",
|
||||||
|
"../snapshot",
|
||||||
|
"../util",
|
||||||
"//base",
|
"//base",
|
||||||
"//testing/gtest",
|
"//testing/gtest",
|
||||||
"//third_party/crashpad/crashpad/compat",
|
|
||||||
"//third_party/crashpad/crashpad/snapshot",
|
|
||||||
"//third_party/crashpad/crashpad/util",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if (is_mac) {
|
if (is_mac) {
|
||||||
@ -104,11 +104,11 @@ source_set("test_test") {
|
|||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
":test",
|
":test",
|
||||||
|
"../compat",
|
||||||
|
"../util",
|
||||||
"//base",
|
"//base",
|
||||||
"//testing/gmock",
|
"//testing/gmock",
|
||||||
"//testing/gtest",
|
"//testing/gtest",
|
||||||
"//third_party/crashpad/crashpad/compat",
|
|
||||||
"//third_party/crashpad/crashpad/util",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
data_deps = [
|
data_deps = [
|
||||||
|
@ -18,7 +18,7 @@ source_set("tool_support") {
|
|||||||
"tool_support.h",
|
"tool_support.h",
|
||||||
]
|
]
|
||||||
|
|
||||||
public_configs = [ "//third_party/crashpad/crashpad:crashpad_config" ]
|
public_configs = [ "..:crashpad_config" ]
|
||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
"//base",
|
"//base",
|
||||||
@ -32,11 +32,11 @@ executable("crashpad_database_util") {
|
|||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
":tool_support",
|
":tool_support",
|
||||||
|
"../client",
|
||||||
|
"../compat",
|
||||||
|
"../util",
|
||||||
"//base",
|
"//base",
|
||||||
"//build/win:default_exe_manifest",
|
"//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 = [
|
deps = [
|
||||||
":tool_support",
|
":tool_support",
|
||||||
|
"../compat",
|
||||||
|
"../util",
|
||||||
"//base",
|
"//base",
|
||||||
"//build/win:default_exe_manifest",
|
"//build/win:default_exe_manifest",
|
||||||
"//third_party/crashpad/crashpad/compat",
|
|
||||||
"//third_party/crashpad/crashpad/util",
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -61,12 +61,12 @@ executable("generate_dump") {
|
|||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
":tool_support",
|
":tool_support",
|
||||||
|
"../compat",
|
||||||
|
"../minidump",
|
||||||
|
"../snapshot",
|
||||||
|
"../util",
|
||||||
"//base",
|
"//base",
|
||||||
"//build/win:default_exe_manifest",
|
"//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) {
|
if (is_mac) {
|
||||||
@ -96,9 +96,9 @@ if (is_mac) {
|
|||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
":tool_support",
|
":tool_support",
|
||||||
|
"../compat",
|
||||||
|
"../util",
|
||||||
"//base",
|
"//base",
|
||||||
"//third_party/crashpad/crashpad/compat",
|
|
||||||
"//third_party/crashpad/crashpad/util",
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -121,9 +121,9 @@ if (is_mac) {
|
|||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
":tool_support",
|
":tool_support",
|
||||||
|
"../compat",
|
||||||
|
"../util",
|
||||||
"//base",
|
"//base",
|
||||||
"//third_party/crashpad/crashpad/compat",
|
|
||||||
"//third_party/crashpad/crashpad/util",
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -139,9 +139,9 @@ if (is_mac) {
|
|||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
":tool_support",
|
":tool_support",
|
||||||
|
"../compat",
|
||||||
|
"../util",
|
||||||
"//base",
|
"//base",
|
||||||
"//third_party/crashpad/crashpad/compat",
|
|
||||||
"//third_party/crashpad/crashpad/util",
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -152,10 +152,10 @@ if (is_mac) {
|
|||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
":tool_support",
|
":tool_support",
|
||||||
|
"../client",
|
||||||
|
"../compat",
|
||||||
|
"../util",
|
||||||
"//base",
|
"//base",
|
||||||
"//third_party/crashpad/crashpad/client",
|
|
||||||
"//third_party/crashpad/crashpad/compat",
|
|
||||||
"//third_party/crashpad/crashpad/util",
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
191
util/BUILD.gn
191
util/BUILD.gn
@ -12,8 +12,6 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import("//build/config/sanitizers/sanitizers.gni")
|
|
||||||
import("//build/toolchain/toolchain.gni")
|
|
||||||
import("//testing/test.gni")
|
import("//testing/test.gni")
|
||||||
|
|
||||||
if (is_mac) {
|
if (is_mac) {
|
||||||
@ -61,11 +59,9 @@ static_library("util") {
|
|||||||
"file/delimited_file_reader.h",
|
"file/delimited_file_reader.h",
|
||||||
"file/directory_reader.h",
|
"file/directory_reader.h",
|
||||||
"file/directory_reader_posix.cc",
|
"file/directory_reader_posix.cc",
|
||||||
"file/directory_reader_win.cc",
|
|
||||||
"file/file_io.cc",
|
"file/file_io.cc",
|
||||||
"file/file_io.h",
|
"file/file_io.h",
|
||||||
"file/file_io_posix.cc",
|
"file/file_io_posix.cc",
|
||||||
"file/file_io_win.cc",
|
|
||||||
"file/file_reader.cc",
|
"file/file_reader.cc",
|
||||||
"file/file_reader.h",
|
"file/file_reader.h",
|
||||||
"file/file_seeker.cc",
|
"file/file_seeker.cc",
|
||||||
@ -74,28 +70,16 @@ static_library("util") {
|
|||||||
"file/file_writer.h",
|
"file/file_writer.h",
|
||||||
"file/filesystem.h",
|
"file/filesystem.h",
|
||||||
"file/filesystem_posix.cc",
|
"file/filesystem_posix.cc",
|
||||||
"file/filesystem_win.cc",
|
|
||||||
"file/scoped_remove_file.cc",
|
"file/scoped_remove_file.cc",
|
||||||
"file/scoped_remove_file.h",
|
"file/scoped_remove_file.h",
|
||||||
"file/string_file.cc",
|
"file/string_file.cc",
|
||||||
"file/string_file.h",
|
"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_sanitizer.h",
|
||||||
"misc/address_types.h",
|
"misc/address_types.h",
|
||||||
"misc/arraysize_unsafe.h",
|
"misc/arraysize_unsafe.h",
|
||||||
"misc/as_underlying_type.h",
|
"misc/as_underlying_type.h",
|
||||||
"misc/clock.h",
|
"misc/clock.h",
|
||||||
"misc/clock_mac.cc",
|
|
||||||
"misc/clock_posix.cc",
|
"misc/clock_posix.cc",
|
||||||
"misc/clock_win.cc",
|
|
||||||
"misc/from_pointer_cast.h",
|
"misc/from_pointer_cast.h",
|
||||||
"misc/implicit_cast.h",
|
"misc/implicit_cast.h",
|
||||||
"misc/initialization_state.h",
|
"misc/initialization_state.h",
|
||||||
@ -106,8 +90,6 @@ static_library("util") {
|
|||||||
"misc/metrics.cc",
|
"misc/metrics.cc",
|
||||||
"misc/metrics.h",
|
"misc/metrics.h",
|
||||||
"misc/paths.h",
|
"misc/paths.h",
|
||||||
"misc/paths_mac.cc",
|
|
||||||
"misc/paths_win.cc",
|
|
||||||
"misc/pdb_structures.cc",
|
"misc/pdb_structures.cc",
|
||||||
"misc/pdb_structures.h",
|
"misc/pdb_structures.h",
|
||||||
"misc/random_string.cc",
|
"misc/random_string.cc",
|
||||||
@ -119,7 +101,6 @@ static_library("util") {
|
|||||||
"misc/symbolic_constants_common.h",
|
"misc/symbolic_constants_common.h",
|
||||||
"misc/time.cc",
|
"misc/time.cc",
|
||||||
"misc/time.h",
|
"misc/time.h",
|
||||||
"misc/time_win.cc",
|
|
||||||
"misc/tri_state.h",
|
"misc/tri_state.h",
|
||||||
"misc/uuid.cc",
|
"misc/uuid.cc",
|
||||||
"misc/uuid.h",
|
"misc/uuid.h",
|
||||||
@ -134,8 +115,6 @@ static_library("util") {
|
|||||||
"net/http_multipart_builder.h",
|
"net/http_multipart_builder.h",
|
||||||
"net/http_transport.cc",
|
"net/http_transport.cc",
|
||||||
"net/http_transport.h",
|
"net/http_transport.h",
|
||||||
"net/http_transport_mac.mm",
|
|
||||||
"net/http_transport_win.cc",
|
|
||||||
"net/url.cc",
|
"net/url.cc",
|
||||||
"net/url.h",
|
"net/url.h",
|
||||||
"numeric/checked_address_range.cc",
|
"numeric/checked_address_range.cc",
|
||||||
@ -154,7 +133,6 @@ static_library("util") {
|
|||||||
"posix/drop_privileges.cc",
|
"posix/drop_privileges.cc",
|
||||||
"posix/drop_privileges.h",
|
"posix/drop_privileges.h",
|
||||||
"posix/process_info.h",
|
"posix/process_info.h",
|
||||||
"posix/process_info_mac.cc",
|
|
||||||
"posix/scoped_dir.cc",
|
"posix/scoped_dir.cc",
|
||||||
"posix/scoped_dir.h",
|
"posix/scoped_dir.h",
|
||||||
"posix/scoped_mmap.cc",
|
"posix/scoped_mmap.cc",
|
||||||
@ -177,63 +155,27 @@ static_library("util") {
|
|||||||
"string/split_string.cc",
|
"string/split_string.cc",
|
||||||
"string/split_string.h",
|
"string/split_string.h",
|
||||||
"synchronization/semaphore.h",
|
"synchronization/semaphore.h",
|
||||||
"synchronization/semaphore_mac.cc",
|
|
||||||
"synchronization/semaphore_posix.cc",
|
"synchronization/semaphore_posix.cc",
|
||||||
"synchronization/semaphore_win.cc",
|
|
||||||
"thread/thread.cc",
|
"thread/thread.cc",
|
||||||
"thread/thread.h",
|
"thread/thread.h",
|
||||||
"thread/thread_log_messages.cc",
|
"thread/thread_log_messages.cc",
|
||||||
"thread/thread_log_messages.h",
|
"thread/thread_log_messages.h",
|
||||||
"thread/thread_posix.cc",
|
"thread/thread_posix.cc",
|
||||||
"thread/thread_win.cc",
|
|
||||||
"thread/worker_thread.cc",
|
"thread/worker_thread.cc",
|
||||||
"thread/worker_thread.h",
|
"thread/worker_thread.h",
|
||||||
"win/address_types.h",
|
|
||||||
"win/capture_context.h",
|
|
||||||
"win/checked_win_address_range.h",
|
|
||||||
"win/command_line.cc",
|
|
||||||
"win/command_line.h",
|
|
||||||
"win/critical_section_with_debug_info.cc",
|
|
||||||
"win/critical_section_with_debug_info.h",
|
|
||||||
"win/exception_handler_server.cc",
|
|
||||||
"win/exception_handler_server.h",
|
|
||||||
"win/get_function.cc",
|
|
||||||
"win/get_function.h",
|
|
||||||
"win/get_module_information.cc",
|
|
||||||
"win/get_module_information.h",
|
|
||||||
"win/handle.cc",
|
|
||||||
"win/handle.h",
|
|
||||||
"win/initial_client_data.cc",
|
|
||||||
"win/initial_client_data.h",
|
|
||||||
"win/module_version.cc",
|
|
||||||
"win/module_version.h",
|
|
||||||
"win/nt_internals.cc",
|
|
||||||
"win/nt_internals.h",
|
|
||||||
"win/ntstatus_logging.cc",
|
|
||||||
"win/ntstatus_logging.h",
|
|
||||||
"win/process_info.cc",
|
|
||||||
"win/process_info.h",
|
|
||||||
"win/process_structs.h",
|
|
||||||
"win/registration_protocol_win.cc",
|
|
||||||
"win/registration_protocol_win.h",
|
|
||||||
"win/safe_terminate_process.h",
|
|
||||||
"win/scoped_handle.cc",
|
|
||||||
"win/scoped_handle.h",
|
|
||||||
"win/scoped_local_alloc.cc",
|
|
||||||
"win/scoped_local_alloc.h",
|
|
||||||
"win/scoped_process_suspend.cc",
|
|
||||||
"win/scoped_process_suspend.h",
|
|
||||||
"win/scoped_set_event.cc",
|
|
||||||
"win/scoped_set_event.h",
|
|
||||||
"win/session_end_watcher.cc",
|
|
||||||
"win/session_end_watcher.h",
|
|
||||||
"win/termination_codes.h",
|
|
||||||
"win/xp_compat.h",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if (is_mac) {
|
if (is_mac) {
|
||||||
# mach/ are not globally filtered.
|
|
||||||
sources += [
|
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.cc",
|
||||||
"mach/child_port_handshake.h",
|
"mach/child_port_handshake.h",
|
||||||
"mach/child_port_server.cc",
|
"mach/child_port_server.cc",
|
||||||
@ -267,14 +209,69 @@ static_library("util") {
|
|||||||
"mach/task_for_pid.h",
|
"mach/task_for_pid.h",
|
||||||
"mach/task_memory.cc",
|
"mach/task_memory.cc",
|
||||||
"mach/task_memory.h",
|
"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",
|
||||||
]
|
]
|
||||||
}
|
|
||||||
|
|
||||||
if (is_mac) {
|
|
||||||
sources += get_target_outputs(":mig")
|
sources += get_target_outputs(":mig")
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_win) {
|
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",
|
||||||
|
"win/command_line.cc",
|
||||||
|
"win/command_line.h",
|
||||||
|
"win/critical_section_with_debug_info.cc",
|
||||||
|
"win/critical_section_with_debug_info.h",
|
||||||
|
"win/exception_handler_server.cc",
|
||||||
|
"win/exception_handler_server.h",
|
||||||
|
"win/get_function.cc",
|
||||||
|
"win/get_function.h",
|
||||||
|
"win/get_module_information.cc",
|
||||||
|
"win/get_module_information.h",
|
||||||
|
"win/handle.cc",
|
||||||
|
"win/handle.h",
|
||||||
|
"win/initial_client_data.cc",
|
||||||
|
"win/initial_client_data.h",
|
||||||
|
"win/module_version.cc",
|
||||||
|
"win/module_version.h",
|
||||||
|
"win/nt_internals.cc",
|
||||||
|
"win/nt_internals.h",
|
||||||
|
"win/ntstatus_logging.cc",
|
||||||
|
"win/ntstatus_logging.h",
|
||||||
|
"win/process_info.cc",
|
||||||
|
"win/process_info.h",
|
||||||
|
"win/process_structs.h",
|
||||||
|
"win/registration_protocol_win.cc",
|
||||||
|
"win/registration_protocol_win.h",
|
||||||
|
"win/safe_terminate_process.h",
|
||||||
|
"win/scoped_handle.cc",
|
||||||
|
"win/scoped_handle.h",
|
||||||
|
"win/scoped_local_alloc.cc",
|
||||||
|
"win/scoped_local_alloc.h",
|
||||||
|
"win/scoped_process_suspend.cc",
|
||||||
|
"win/scoped_process_suspend.h",
|
||||||
|
"win/scoped_set_event.cc",
|
||||||
|
"win/scoped_set_event.h",
|
||||||
|
"win/session_end_watcher.cc",
|
||||||
|
"win/session_end_watcher.h",
|
||||||
|
"win/termination_codes.h",
|
||||||
|
"win/xp_compat.h",
|
||||||
|
]
|
||||||
|
|
||||||
# There's no ml.exe yet in cross builds, so provide broken-but-not-asm
|
# There's no ml.exe yet in cross builds, so provide broken-but-not-asm
|
||||||
# versions of the functions defined in .asm files.
|
# 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 files from here and generated files starting with "util".
|
||||||
include_dirs = [ "$root_gen_dir/third_party/crashpad/crashpad" ]
|
include_dirs = [ "$root_gen_dir/third_party/crashpad/crashpad" ]
|
||||||
|
|
||||||
public_deps = [
|
public_deps = [
|
||||||
"//third_party/crashpad/crashpad/compat",
|
"../compat",
|
||||||
]
|
]
|
||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
"//base",
|
"//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) {
|
if (is_mac) {
|
||||||
@ -345,10 +344,6 @@ source_set("util_test") {
|
|||||||
"file/file_reader_test.cc",
|
"file/file_reader_test.cc",
|
||||||
"file/filesystem_test.cc",
|
"file/filesystem_test.cc",
|
||||||
"file/string_file_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/arraysize_unsafe_test.cc",
|
||||||
"misc/clock_test.cc",
|
"misc/clock_test.cc",
|
||||||
"misc/from_pointer_cast_test.cc",
|
"misc/from_pointer_cast_test.cc",
|
||||||
@ -386,23 +381,14 @@ source_set("util_test") {
|
|||||||
"thread/thread_log_messages_test.cc",
|
"thread/thread_log_messages_test.cc",
|
||||||
"thread/thread_test.cc",
|
"thread/thread_test.cc",
|
||||||
"thread/worker_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) {
|
if (is_mac) {
|
||||||
# mach/ are not globally filtered.
|
|
||||||
sources += [
|
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_handshake_test.cc",
|
||||||
"mach/child_port_server_test.cc",
|
"mach/child_port_server_test.cc",
|
||||||
"mach/composite_mach_message_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 = [
|
data = [
|
||||||
"net/http_transport_test_server.py",
|
"net/http_transport_test_server.py",
|
||||||
"net/testdata/",
|
"net/testdata/",
|
||||||
@ -428,13 +431,13 @@ source_set("util_test") {
|
|||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
":util",
|
":util",
|
||||||
|
"../client",
|
||||||
|
"../compat",
|
||||||
|
"../test",
|
||||||
|
"../third_party/zlib",
|
||||||
"//base",
|
"//base",
|
||||||
"//testing/gmock",
|
"//testing/gmock",
|
||||||
"//testing/gtest",
|
"//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) {
|
if (is_mac) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user