Prepare crashpad mig stuff for -Wunreachable-code in chromium_code.
Bug: chromium:346399
Change-Id: Ibab7aa36f7c66ede0b107fa7a60670747146e7f7
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>
GitOrigin-RevId: 296501351816448182af26c5f51c41e1a0ff7bea
diff --git a/util/BUILD.gn b/util/BUILD.gn
index aa89026..bd0d242 100644
--- a/util/BUILD.gn
+++ b/util/BUILD.gn
@@ -75,6 +75,17 @@
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") {
@@ -281,7 +292,6 @@
"process/process_memory_mac.h",
"synchronization/semaphore_mac.cc",
]
- sources += get_target_outputs(":mig")
}
deps = []
@@ -483,7 +493,7 @@
"IOKit.framework",
]
deps += [
- ":mig",
+ ":mig_output",
"../third_party/apple_cf:apple_cf",
]
include_dirs += [ "$root_build_dir/gen" ]