From a65f1aee843e7f8c9ed564d0dd08b497a4a3561a Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Wed, 23 Sep 2015 13:52:22 -0700 Subject: [PATCH] Make multiple rules to generate a file an error Pass -w dupbuild=err to ninja to make defining multiple rules to build a file an error instead of a warning. Proceeding with the build would result in undefined behavior, and nobody notices the warning. Change-Id: Iadac88f8835121a8685bff835acba638100bb654 --- core/ninja.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/ninja.mk b/core/ninja.mk index 2878514e6..5876ad80c 100644 --- a/core/ninja.mk +++ b/core/ninja.mk @@ -116,6 +116,10 @@ ifneq (,$(filter showcommands,$(ORIGINAL_MAKECMDGOALS))) NINJA_ARGS += "-v" endif +# Make multiple rules to generate the same target an error instead of +# proceeding with undefined behavior. +NINJA_ARGS += -w dupbuild=err + ifdef USE_GOMA KATI_MAKEPARALLEL := $(MAKEPARALLEL) # Ninja runs remote jobs (i.e., commands which contain gomacc) with -- 2.11.0