2022-09-06 19:14:07 -04:00
|
|
|
# Copyright 2017 The Crashpad Authors
|
2017-11-29 11:04:47 -08:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
|
|
|
# When building in Chromium, these configs is used to set #defines that indicate
|
|
|
|
# whether code is being built standalone, or in Chromium, or potentially in some
|
|
|
|
# other configutation.
|
|
|
|
|
2017-12-19 15:31:04 -08:00
|
|
|
import("crashpad_buildconfig.gni")
|
2017-11-29 11:04:47 -08:00
|
|
|
|
2017-12-18 14:35:55 -08:00
|
|
|
config("crashpad_is_in_chromium") {
|
|
|
|
if (crashpad_is_in_chromium) {
|
|
|
|
defines = [ "CRASHPAD_IS_IN_CHROMIUM" ]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-05-04 17:06:13 -07:00
|
|
|
config("crashpad_is_in_fuchsia") {
|
|
|
|
if (crashpad_is_in_fuchsia) {
|
|
|
|
defines = [ "CRASHPAD_IS_IN_FUCHSIA" ]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-11-03 15:06:18 -07:00
|
|
|
config("flock_always_supported_defines") {
|
2023-06-30 11:39:44 -04:00
|
|
|
defines =
|
|
|
|
[ "CRASHPAD_FLOCK_ALWAYS_SUPPORTED=$crashpad_flock_always_supported" ]
|
2022-11-03 15:06:18 -07:00
|
|
|
}
|
|
|
|
|
2017-12-18 14:35:55 -08:00
|
|
|
group("default_exe_manifest_win") {
|
|
|
|
if (crashpad_is_in_chromium) {
|
2020-01-23 08:00:33 -05:00
|
|
|
deps = [ "//build/win:default_exe_manifest" ]
|
2017-11-29 11:04:47 -08:00
|
|
|
}
|
|
|
|
}
|
2018-06-04 16:16:19 -07:00
|
|
|
|
|
|
|
config("crashpad_fuzzer_flags") {
|
|
|
|
cflags = [
|
|
|
|
"-fsanitize=address",
|
|
|
|
"-fsanitize-address-use-after-scope",
|
|
|
|
"-fsanitize=fuzzer",
|
|
|
|
]
|
|
|
|
|
2019-11-04 21:19:33 -05:00
|
|
|
ldflags = [ "-fsanitize=address" ]
|
|
|
|
}
|
|
|
|
|
2023-06-30 11:39:44 -04:00
|
|
|
if (crashpad_is_apple) {
|
|
|
|
group("apple_enable_arc") {
|
2023-07-26 16:46:52 -04:00
|
|
|
# If `crashpad_is_in_chromium`, then because Chromium enables ARC
|
|
|
|
# compilation by default, no special configuration is needed.
|
|
|
|
|
|
|
|
if (crashpad_is_standalone) {
|
2023-06-30 11:39:44 -04:00
|
|
|
public_configs = [ "//third_party/mini_chromium/mini_chromium/build/config:apple_enable_arc" ]
|
2019-11-04 21:19:33 -05:00
|
|
|
}
|
|
|
|
}
|
2023-06-30 11:39:44 -04:00
|
|
|
}
|
2019-11-04 21:19:33 -05:00
|
|
|
|
2023-06-30 11:39:44 -04:00
|
|
|
if (crashpad_is_ios) {
|
2019-11-04 21:19:33 -05:00
|
|
|
group("ios_xctest") {
|
|
|
|
if (crashpad_is_in_chromium) {
|
|
|
|
public_configs = [ "//build/config/ios:xctest_config" ]
|
|
|
|
} else if (crashpad_is_standalone) {
|
|
|
|
public_configs = [
|
|
|
|
"//third_party/mini_chromium/mini_chromium/build/ios:xctest_config",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
2018-06-04 16:16:19 -07:00
|
|
|
}
|