gn: Avoid depending on BUILDCONFIG.gn globals

Goes with https://chromium-review.googlesource.com/c/chromium/mini_chromium/+/834648.

Includes mini_chromium DEPS roll to pull in edfe51ce81

Bug: crashpad:79, crashpad:196
Change-Id: Ib45cc738aecf9ae727f8faeff81f3b71e2dc9de8
Reviewed-on: https://chromium-review.googlesource.com/834543
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
This commit is contained in:
Scott Graham 2017-12-19 15:31:04 -08:00 committed by Commit Bot
parent 3a41c51668
commit ab153f7e1b
17 changed files with 221 additions and 138 deletions

View File

@ -12,7 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import("build/crashpad_dependencies.gni")
import("build/crashpad_buildconfig.gni")
import("build/test.gni")
config("crashpad_config") {
include_dirs = [ "." ]

2
DEPS
View File

@ -28,7 +28,7 @@ deps = {
'5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f',
'crashpad/third_party/mini_chromium/mini_chromium':
Var('chromium_git') + '/chromium/mini_chromium@' +
'404f6dbf9928dd19cb437ad5b05abfdd97b5bf67',
'edfe51ce818e55eae73ab3f144a360e855533888',
'crashpad/third_party/zlib/zlib':
Var('chromium_git') + '/chromium/src/third_party/zlib@' +
'13dc246a58e4b72104d35f9b1809af95221ebda7',

View File

@ -16,7 +16,7 @@
# whether code is being built standalone, or in Chromium, or potentially in some
# other configutation.
import("crashpad_dependencies.gni")
import("crashpad_buildconfig.gni")
config("crashpad_is_in_chromium") {
if (crashpad_is_in_chromium) {

View File

@ -12,6 +12,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# Intentionally very minimal, so that Crashpad can build in-tree in a variety of
# other projects, unrelated to the variables that are set in those projects'
# BUILDCONFIG.gn. Do not add more variables here. Instead, make them available
# in build/crashpad_buildconfig.gni if they must be globally available.
if (target_os == "") {
target_os = host_os
}
@ -28,35 +33,7 @@ if (current_cpu == "") {
current_cpu = target_cpu
}
is_mac = false
is_win = false
is_linux = false
is_android = false
is_fuchsia = false
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
}
declare_args() {
# When true, enables the debug configuration, with additional run-time checks
# and logging. When false, enables the release configuration, with additional
# optimizations.
is_debug = false
# When true, configures for compilation with Clang.
is_clang = !is_win
}
if (is_win) {
if (current_os == "win") {
set_default_toolchain(
"//third_party/mini_chromium/mini_chromium/build:msvc_toolchain")
} else {
@ -64,12 +41,19 @@ if (is_win) {
"//third_party/mini_chromium/mini_chromium/build:gcc_like_toolchain")
}
declare_args() {
# When true, enables the debug configuration, with additional run-time checks
# and logging. When false, enables the release configuration, with additional
# optimizations.
is_debug = false
}
_default_configs = [
"//third_party/mini_chromium/mini_chromium/build:default",
"//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors",
]
default_executable_configs =
_default_executable_configs =
_default_configs +
[ "//third_party/mini_chromium/mini_chromium/build:executable" ]
@ -82,7 +66,7 @@ set_defaults("static_library") {
}
set_defaults("executable") {
configs = default_executable_configs
configs = _default_executable_configs
}
set_defaults("loadable_module") {
@ -93,8 +77,6 @@ set_defaults("shared_library") {
configs = _default_configs
}
# These are set to constant values for Chromium build file compatibility. This
# generally avoids extra explicit checking of whether or not Crashpad is
# building in Chromium mode or not.
is_ios = false
is_component_build = false
set_defaults("test") {
configs = _default_executable_configs
}

View File

@ -0,0 +1,59 @@
# 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.
declare_args() {
# Determines various flavors of build configuration, and which concrete
# targets to use for dependencies. Valid values are "standalone", "chromium",
# and "fuchsia".
crashpad_dependencies = "standalone"
}
assert(
crashpad_dependencies == "chromium" || crashpad_dependencies == "fuchsia" ||
crashpad_dependencies == "standalone")
crashpad_is_in_chromium = crashpad_dependencies == "chromium"
crashpad_is_in_fuchsia = crashpad_dependencies == "fuchsia"
crashpad_is_standalone = crashpad_dependencies == "standalone"
if (crashpad_is_in_chromium) {
crashpad_is_mac = is_mac
crashpad_is_win = is_win
crashpad_is_linux = is_linux
crashpad_is_android = is_android
crashpad_is_fuchsia = is_fuchsia
crashpad_is_posix = is_posix
crashpad_is_clang = is_clang
} else {
# Using mini_chromium, but in different locations depending on whether in
# Fuchsia, or standalone.
if (crashpad_is_in_fuchsia) {
import("//third_party/mini_chromium/build/compiler.gni")
import("//third_party/mini_chromium/build/platform.gni")
} else {
import("../third_party/mini_chromium/mini_chromium/build/compiler.gni")
import("../third_party/mini_chromium/mini_chromium/build/platform.gni")
}
crashpad_is_mac = mini_chromium_is_mac
crashpad_is_win = mini_chromium_is_win
crashpad_is_linux = mini_chromium_is_linux
crashpad_is_android = mini_chromium_is_android
crashpad_is_fuchsia = mini_chromium_is_fuchsia
crashpad_is_posix = mini_chromium_is_posix
crashpad_is_clang = mini_chromium_is_clang
}

26
build/test.gni Normal file
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.
import("crashpad_buildconfig.gni")
if (crashpad_is_in_chromium) {
import("//testing/test.gni")
} else {
template("test") {
executable(target_name) {
testonly = true
forward_variables_from(invoker, "*")
}
}
}

View File

@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import("../build/crashpad_buildconfig.gni")
static_library("client") {
sources = [
"annotation.cc",
@ -32,7 +34,7 @@ static_library("client") {
"simulate_crash.h",
]
if (is_mac) {
if (crashpad_is_mac) {
sources += [
"capture_context_mac.S",
"capture_context_mac.h",
@ -43,7 +45,7 @@ static_library("client") {
]
}
if (is_win) {
if (crashpad_is_win) {
sources += [
"crash_report_database_win.cc",
"crashpad_client_win.cc",
@ -51,7 +53,7 @@ static_library("client") {
]
}
if (is_fuchsia) {
if (crashpad_is_fuchsia) {
sources += [
"crash_report_database_fuchsia.cc",
"crashpad_client_fuchsia.cc",
@ -66,7 +68,7 @@ static_library("client") {
"../util",
]
if (is_win) {
if (crashpad_is_win) {
libs = [ "rpcrt4.lib" ]
cflags = [ "/wd4201" ] # nonstandard extension used : nameless struct/union
}
@ -85,14 +87,14 @@ source_set("client_test") {
"simple_string_dictionary_test.cc",
]
if (is_mac) {
if (crashpad_is_mac) {
sources += [
"capture_context_mac_test.cc",
"simulate_crash_mac_test.cc",
]
}
if (is_win) {
if (crashpad_is_win) {
sources += [ "crashpad_client_win_test.cc" ]
}
@ -110,7 +112,7 @@ source_set("client_test") {
"../handler:crashpad_handler",
]
if (is_win) {
if (crashpad_is_win) {
data_deps += [ "../handler:crashpad_handler_console" ]
}
}

View File

@ -12,18 +12,20 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import("../build/crashpad_buildconfig.gni")
config("compat_config") {
include_dirs = []
if (is_mac) {
if (crashpad_is_mac) {
include_dirs += [ "mac" ]
}
if (is_linux) {
if (crashpad_is_linux) {
include_dirs += [ "linux" ]
}
if (is_win) {
if (crashpad_is_win) {
include_dirs += [ "win" ]
} else {
include_dirs += [ "non_win" ]
@ -31,7 +33,7 @@ config("compat_config") {
}
template("compat_target") {
if (is_mac) {
if (crashpad_is_mac) {
# There are no sources to compile, which doesnt mix will with a
# static_library.
group(target_name) {
@ -47,7 +49,7 @@ template("compat_target") {
compat_target("compat") {
sources = []
if (is_mac) {
if (crashpad_is_mac) {
sources += [
"mac/AvailabilityMacros.h",
"mac/kern/exc_resource.h",
@ -59,14 +61,14 @@ compat_target("compat") {
sources += [ "non_mac/mach/mach.h" ]
}
if (is_linux) {
if (crashpad_is_linux) {
sources += [
"linux/signal.h",
"linux/sys/ptrace.h",
]
}
if (is_win) {
if (crashpad_is_win) {
sources += [
"win/getopt.h",
"win/strings.cc",
@ -96,7 +98,7 @@ compat_target("compat") {
deps = []
if (is_win) {
if (crashpad_is_win) {
deps += [ "../third_party/getopt" ]
}
}

View File

@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import("../build/crashpad_buildconfig.gni")
static_library("handler") {
sources = [
"crash_report_upload_thread.cc",
@ -24,7 +26,7 @@ static_library("handler") {
"user_stream_data_source.h",
]
if (is_mac) {
if (crashpad_is_mac) {
sources += [
"mac/crash_report_exception_handler.cc",
"mac/crash_report_exception_handler.h",
@ -35,7 +37,7 @@ static_library("handler") {
]
}
if (is_linux) {
if (crashpad_is_linux) {
sources += [
"linux/exception_handler_server.cc",
"linux/exception_handler_server.h",
@ -47,14 +49,14 @@ static_library("handler") {
]
}
if (is_win) {
if (crashpad_is_win) {
sources += [
"win/crash_report_exception_handler.cc",
"win/crash_report_exception_handler.h",
]
}
if (is_fuchsia) {
if (crashpad_is_fuchsia) {
sources += [
"fuchsia/crash_report_exception_handler.cc",
"fuchsia/crash_report_exception_handler.h",
@ -75,7 +77,7 @@ static_library("handler") {
"../util",
]
if (is_win) {
if (crashpad_is_win) {
cflags = [ "/wd4201" ] # nonstandard extension used : nameless struct/union
}
}
@ -87,11 +89,11 @@ source_set("handler_test") {
"minidump_to_upload_parameters_test.cc",
]
if (is_linux) {
if (crashpad_is_linux) {
sources += [ "linux/exception_handler_server_test.cc" ]
}
if (is_win) {
if (crashpad_is_win) {
sources += [ "crashpad_handler_test.cc" ]
}
@ -107,7 +109,9 @@ source_set("handler_test") {
"../util",
]
if (is_win) {
if (crashpad_is_win) {
sources += [ "crashpad_handler_test.cc" ]
data_deps = [
":crashpad_handler_test_extended_handler",
]
@ -126,23 +130,25 @@ executable("crashpad_handler") {
"../third_party/mini_chromium:base",
]
if (is_mac && 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/../../../../../../../..",
if (crashpad_is_mac && crashpad_is_in_chromium) {
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/Helpers/
# so set the rpath for that too.
"-rpath",
"@loader_path/../../../../..",
]
# The handler is also in
# Content Shell.app/Contents/Frameworks/Content Shell Framework.framework/Helpers/
# so set the rpath for that too.
"-rpath",
"@loader_path/../../../../..",
]
}
}
if (is_win) {
if (crashpad_is_win) {
configs -= [ "//build/config/win:console" ]
configs += [ "//build/config/win:windowed" ]
}
@ -165,7 +171,7 @@ executable("crashpad_handler_test_extended_handler") {
]
}
if (is_win) {
if (crashpad_is_win) {
executable("crashpad_handler_com") {
sources = [
"main.cc",

View File

@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import("../build/crashpad_buildconfig.gni")
static_library("minidump") {
sources = [
"minidump_annotation_writer.cc",
@ -79,7 +81,7 @@ static_library("minidump") {
"../util",
]
if (is_win) {
if (crashpad_is_win) {
cflags = [
"/wd4201", # nonstandard extension used : nameless struct/union
"/wd4324", # 'struct' : structure was padded due to __declspec(align())
@ -120,7 +122,7 @@ static_library("test_support") {
"../third_party/mini_chromium:base",
]
if (is_win) {
if (crashpad_is_win) {
cflags = [ "/wd4201" ] # nonstandard extension used : nameless struct/union
}
}
@ -161,7 +163,7 @@ source_set("minidump_test") {
"../util",
]
if (is_win) {
if (crashpad_is_win) {
cflags = [ "/wd4201" ] # nonstandard extension used : nameless struct/union
}
}

View File

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import("../build/crashpad_dependencies.gni")
import("../build/crashpad_buildconfig.gni")
static_library("snapshot") {
sources = [
@ -52,7 +52,7 @@ static_library("snapshot") {
"unloaded_module_snapshot.h",
]
if (is_mac) {
if (crashpad_is_mac) {
sources += [
"mac/cpu_context_mac.cc",
"mac/cpu_context_mac.h",
@ -94,7 +94,7 @@ static_library("snapshot") {
]
}
if (is_linux) {
if (crashpad_is_linux) {
sources += [
"elf/elf_dynamic_array_reader.cc",
"elf/elf_dynamic_array_reader.h",
@ -122,7 +122,7 @@ static_library("snapshot") {
]
}
if (is_win) {
if (crashpad_is_win) {
sources += [
"win/capture_memory_delegate_win.cc",
"win/capture_memory_delegate_win.h",
@ -155,7 +155,7 @@ static_library("snapshot") {
]
}
if (is_fuchsia) {
if (crashpad_is_fuchsia) {
sources += [
"fuchsia/process_snapshot_fuchsia.cc",
"fuchsia/process_snapshot_fuchsia.h",
@ -178,13 +178,13 @@ static_library("snapshot") {
"../util",
]
if (is_win) {
if (crashpad_is_win) {
cflags = [ "/wd4201" ] # nonstandard extension used : nameless struct/union
libs = [ "powrprof.lib" ]
}
}
if (is_win) {
if (crashpad_is_win) {
static_library("snapshot_api") {
sources = [
"api/module_annotations_win.cc",
@ -241,14 +241,14 @@ static_library("test_support") {
"../util",
]
if (is_win) {
if (crashpad_is_win) {
cflags = [ "/wd4201" ] # nonstandard extension used : nameless struct/union
}
}
config("snapshot_test_link") {
visibility = [ ":*" ]
if (is_linux) {
if (crashpad_is_linux) {
# Theres no way to make the link depend on this file. “inputs” doesnt have
# the intended effect in a config. https://crbug.com/781858,
# https://crbug.com/796187.
@ -267,7 +267,7 @@ source_set("snapshot_test") {
"minidump/process_snapshot_minidump_test.cc",
]
if (is_mac) {
if (crashpad_is_mac) {
sources += [
"mac/cpu_context_mac_test.cc",
"mac/mach_o_image_annotations_reader_test.cc",
@ -279,7 +279,7 @@ source_set("snapshot_test") {
]
}
if (is_linux) {
if (crashpad_is_linux) {
sources += [
"elf/elf_image_reader_test.cc",
"elf/elf_image_reader_test_note.S",
@ -293,7 +293,7 @@ source_set("snapshot_test") {
sources += [ "crashpad_info_client_options_test.cc" ]
}
if (is_win) {
if (crashpad_is_win) {
sources += [
"api/module_annotations_win_test.cc",
"win/cpu_context_win_test.cc",
@ -332,7 +332,7 @@ source_set("snapshot_test") {
":crashpad_snapshot_test_module_small",
]
if (is_mac) {
if (crashpad_is_mac) {
libs = [ "OpenCL.framework" ]
data_deps += [
@ -341,11 +341,11 @@ source_set("snapshot_test") {
]
}
if (is_linux) {
if (crashpad_is_linux) {
libs = [ "dl" ]
}
if (is_win) {
if (crashpad_is_win) {
cflags = [ "/wd4201" ] # nonstandard extension used : nameless struct/union
data_deps += [
@ -392,7 +392,7 @@ loadable_module("crashpad_snapshot_test_module_small") {
]
}
if (is_mac) {
if (crashpad_is_mac) {
loadable_module("crashpad_snapshot_test_module_crashy_initializer") {
testonly = true
sources = [
@ -408,7 +408,7 @@ if (is_mac) {
}
}
if (is_win) {
if (crashpad_is_win) {
executable("crashpad_snapshot_test_annotations") {
testonly = true
sources = [

View File

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import("../build/crashpad_dependencies.gni")
import("../build/crashpad_buildconfig.gni")
static_library("test") {
testonly = true
@ -47,12 +47,12 @@ static_library("test") {
"scoped_temp_dir_posix.cc",
]
if (!is_fuchsia) {
if (!crashpad_is_fuchsia) {
sources += [ "multiprocess_exec_posix.cc" ]
}
}
if (is_mac) {
if (crashpad_is_mac) {
sources += [
"mac/dyld.cc",
"mac/dyld.h",
@ -65,7 +65,7 @@ static_library("test") {
]
}
if (is_linux) {
if (crashpad_is_linux) {
sources += [
"linux/fake_ptrace_connection.cc",
"linux/fake_ptrace_connection.h",
@ -76,7 +76,7 @@ static_library("test") {
]
}
if (is_win) {
if (crashpad_is_win) {
sources += [
"multiprocess_exec_win.cc",
"scoped_temp_dir_win.cc",
@ -106,7 +106,7 @@ static_library("test") {
"../util",
]
if (is_mac) {
if (crashpad_is_mac) {
libs = [ "bsm" ]
deps += [
"../handler",
@ -125,22 +125,22 @@ source_set("test_test") {
"test_paths_test.cc",
]
if (crashpad_is_posix && !is_fuchsia) {
if (crashpad_is_posix && !crashpad_is_fuchsia) {
sources += [ "multiprocess_posix_test.cc" ]
}
if (is_mac) {
if (crashpad_is_mac) {
sources += [ "mac/mach_multiprocess_test.cc" ]
}
if (is_win) {
if (crashpad_is_win) {
sources += [
"win/win_child_process_test.cc",
"win/win_multiprocess_test.cc",
]
}
if (!is_fuchsia) {
if (!crashpad_is_fuchsia) {
sources += [
# TODO(scottmg): A MultiprocessExecFuchsia is probably desirable, but
# hasn't been implemented yet.

View File

@ -12,7 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import("../../build/crashpad_dependencies.gni")
import("../../build/crashpad_buildconfig.gni")
import("../../build/test.gni")
if (crashpad_is_in_chromium) {
group("gtest") {
@ -168,7 +169,7 @@ if (crashpad_is_in_chromium) {
":gtest",
]
if (is_clang) {
if (crashpad_is_clang) {
cflags_cc = [
# For gtest/googlemock/test/gmock-matchers_test.ccs
# Unstreamable::value_.
@ -249,7 +250,7 @@ if (crashpad_is_in_chromium) {
config("gmock_public_config") {
include_dirs = [ "gtest/googlemock/include" ]
if (is_clang) {
if (crashpad_is_clang) {
cflags_cc = [
# The MOCK_METHODn() macros do not specify “override”, which triggers
# this warning in users: “error: 'Method' overrides a member function
@ -336,7 +337,7 @@ if (crashpad_is_in_chromium) {
":gtest",
]
if (is_clang) {
if (crashpad_is_clang) {
cflags_cc = [
# For gtest/googlemock/test/gmock-matchers_test.ccs
# testing::gmock_matchers_test::Unprintable::c_.

View File

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import("../../build/crashpad_dependencies.gni")
import("../../build/crashpad_buildconfig.gni")
group("base") {
if (crashpad_is_in_chromium) {

View File

@ -12,11 +12,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import("../../build/crashpad_dependencies.gni")
import("../../build/crashpad_buildconfig.gni")
if (crashpad_is_in_chromium || crashpad_is_in_fuchsia) {
zlib_source = "external"
} else if (!is_win && !is_fuchsia) {
} else if (!crashpad_is_win && !crashpad_is_fuchsia) {
zlib_source = "system"
} else {
zlib_source = "embedded"
@ -82,7 +82,7 @@ if (zlib_source == "external") {
defines = [ "HAVE_STDARG_H" ]
public_configs = [ ":zlib_config" ]
if (is_win) {
if (crashpad_is_win) {
cflags += [
"/wd4131", # uses old-style declarator
"/wd4244", # conversion from 't1' to 't2', possible loss of data
@ -104,13 +104,13 @@ if (zlib_source == "external") {
"zlib/x86.c",
"zlib/x86.h",
]
if (!is_win || is_clang) {
if (!crashpad_is_win || crashpad_is_clang) {
cflags += [
"-msse4.2",
"-mpclmul",
]
}
if (is_clang) {
if (crashpad_is_clang) {
cflags += [ "-Wno-incompatible-pointer-types" ]
}
} else {

View File

@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import("../build/crashpad_buildconfig.gni")
source_set("tool_support") {
sources = [
"tool_support.cc",
@ -69,7 +71,7 @@ executable("generate_dump") {
"../util",
]
if (is_mac) {
if (crashpad_is_mac) {
# This would be better as a config so that it could be shared with
# exception_port_tool, but configs cant alter “inputs”.
# https://crbug.com/781858.
@ -84,12 +86,12 @@ executable("generate_dump") {
]
}
if (is_win) {
if (crashpad_is_win) {
cflags = [ "/wd4201" ] # nonstandard extension used : nameless struct/union
}
}
if (is_mac) {
if (crashpad_is_mac) {
executable("catch_exception_tool") {
sources = [
"mac/catch_exception_tool.cc",

View File

@ -12,9 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import("../build/crashpad_dependencies.gni")
import("../build/crashpad_buildconfig.gni")
if (is_mac) {
if (crashpad_is_mac) {
if (crashpad_is_in_chromium) {
import("//build/config/sysroot.gni")
} else {
@ -168,7 +168,7 @@ static_library("util") {
"thread/thread_posix.cc",
]
if (!is_fuchsia) {
if (!crashpad_is_fuchsia) {
sources += [
"posix/close_multiple.cc",
"posix/close_multiple.h",
@ -187,7 +187,7 @@ static_library("util") {
}
}
if (is_mac) {
if (crashpad_is_mac) {
sources += [
"mac/checked_mach_address_range.h",
"mac/launchd.h",
@ -240,7 +240,7 @@ static_library("util") {
sources += get_target_outputs(":mig")
}
if (is_linux) {
if (crashpad_is_linux) {
sources += [
"linux/address_types.h",
"linux/auxiliary_vector.cc",
@ -280,7 +280,7 @@ static_library("util") {
]
}
if (is_win) {
if (crashpad_is_win) {
sources += [
"file/directory_reader_win.cc",
"file/file_io_win.cc",
@ -357,7 +357,7 @@ static_library("util") {
}
}
if (is_fuchsia) {
if (crashpad_is_fuchsia) {
sources += [
"misc/paths_fuchsia.cc",
"net/http_transport_fuchsia.cc",
@ -378,7 +378,7 @@ static_library("util") {
"../third_party/zlib",
]
if (is_mac) {
if (crashpad_is_mac) {
libs = [
"bsm",
"CoreFoundation.framework",
@ -389,11 +389,11 @@ static_library("util") {
include_dirs += [ "$root_build_dir/gen" ]
}
if (is_linux) {
if (crashpad_is_linux) {
libs = [ "curl" ]
}
if (is_win) {
if (crashpad_is_win) {
cflags = [
"/wd4201", # nonstandard extension used : nameless struct/union.
"/wd4577", # 'noexcept' used with no exception handling mode specified.
@ -450,7 +450,7 @@ source_set("util_test") {
"thread/worker_thread_test.cc",
]
if (!is_fuchsia) {
if (!crashpad_is_fuchsia) {
# TODO(scottmg): This requires an implementation of MultiprocessExec for
# testing, and a solution to http_transport_test_server.py -- either a port
# to non-Python, or method of forwarding those requests back to the builder
@ -459,7 +459,7 @@ source_set("util_test") {
}
if (crashpad_is_posix) {
if (!is_fuchsia) {
if (!crashpad_is_fuchsia) {
sources += [
"posix/process_info_test.cc",
"posix/signals_test.cc",
@ -469,7 +469,7 @@ source_set("util_test") {
sources += [ "posix/scoped_mmap_test.cc" ]
}
if (is_mac) {
if (crashpad_is_mac) {
sources += [
"mac/launchd_test.mm",
"mac/mac_util_test.mm",
@ -493,7 +493,7 @@ source_set("util_test") {
]
}
if (is_linux) {
if (crashpad_is_linux) {
sources += [
"linux/auxiliary_vector_test.cc",
"linux/memory_map_test.cc",
@ -508,7 +508,7 @@ source_set("util_test") {
]
}
if (is_win) {
if (crashpad_is_win) {
sources += [
"win/capture_context_test.cc",
"win/command_line_test.cc",
@ -541,11 +541,11 @@ source_set("util_test") {
"../third_party/zlib",
]
if (is_mac) {
if (crashpad_is_mac) {
libs = [ "Foundation.framework" ]
}
if (is_win) {
if (crashpad_is_win) {
libs = [ "rpcrt4.lib" ]
data_deps = [
":crashpad_util_test_process_info_test_child",
@ -554,7 +554,7 @@ source_set("util_test") {
}
}
if (is_win) {
if (crashpad_is_win) {
executable("crashpad_util_test_process_info_test_child") {
testonly = true
sources = [