From 043c473dbe4c32b9f7d079e7cc8c7ada273b6fe5 Mon Sep 17 00:00:00 2001 From: Jonathan Metzman Date: Mon, 16 Oct 2017 15:43:28 +0000 Subject: [PATCH] Add assertion preventing is_component_build=true from being used with use_clang_coverage. Bug: 773530 Change-Id: Ib0997ffdead67437f61e279791a7a8887cbe807f Reviewed-on: https://chromium-review.googlesource.com/714279 Commit-Queue: Jonathan Metzman Reviewed-by: Max Moroz Reviewed-by: Dirk Pranke Cr-Original-Commit-Position: refs/heads/master@{#509058} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 301ce027adbc5555dec9ac7e449af1732ce3a5f9 --- config/coverage/coverage.gni | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/config/coverage/coverage.gni b/config/coverage/coverage.gni index aad7c40be..4ee7bedb8 100644 --- a/config/coverage/coverage.gni +++ b/config/coverage/coverage.gni @@ -15,3 +15,12 @@ declare_args() { assert(!use_clang_coverage || is_clang, "Clang Source-based Code Coverage requires clang.") + +assert(!(use_clang_coverage && is_debug && is_component_build), + "If use_clang_coverage is true and is_debug is true (is_debug " + + "defaults to true), then is_component_build must be false.$0x0A" + + "Try adding is_component_build=false to your GN args.") + +assert( + !(use_clang_coverage && is_component_build), + "Clang Source-based Code Coverage is incompatible with is_component_build.")