Prepare crashpad mig stuff for -Wunreachable-code in chromium_code.

Bug: chromium:346399
Change-Id: I5d93a2f6781dd4dd3483009d9c470050d490be3c
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2116252
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
This commit is contained in:
Nico Weber 2020-03-23 14:59:21 -04:00 committed by Commit Bot
parent 4e2a190ad6
commit 2965013518

View File

@ -75,6 +75,17 @@ if (crashpad_is_mac) {
rebase_path("../compat/mac", root_build_dir), rebase_path("../compat/mac", root_build_dir),
] ]
} }
source_set("mig_output") {
deps = [ ":mig" ]
sources = get_target_outputs(":mig")
if (crashpad_is_in_chromium) {
# mig output contains unreachable code, which irks -Wunreachable-code.
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
}
public_configs = [ "..:crashpad_config" ]
}
} }
static_library("util") { static_library("util") {
@ -281,7 +292,6 @@ static_library("util") {
"process/process_memory_mac.h", "process/process_memory_mac.h",
"synchronization/semaphore_mac.cc", "synchronization/semaphore_mac.cc",
] ]
sources += get_target_outputs(":mig")
} }
deps = [] deps = []
@ -483,7 +493,7 @@ static_library("util") {
"IOKit.framework", "IOKit.framework",
] ]
deps += [ deps += [
":mig", ":mig_output",
"../third_party/apple_cf:apple_cf", "../third_party/apple_cf:apple_cf",
] ]
include_dirs += [ "$root_build_dir/gen" ] include_dirs += [ "$root_build_dir/gen" ]