From 7c21be5c2771b6d23f8c894bb433efba2829cc70 Mon Sep 17 00:00:00 2001 From: Arkadiusz Hiler Date: Wed, 5 Jul 2023 14:32:24 +0300 Subject: [PATCH] Makefile.in: Introduce SUPPRESS_WARNINGS for quieter CI build. Due to how we handle building and compilation flags we end up with a lot of warnings that are normally hidden. Let's introudce an option to suppress them for CI builds to generate smaller, more searchable logs. --- Makefile.in | 7 ++++++- make/rules-cargo.mk | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile.in b/Makefile.in index ba09c011..5fecdfd3 100644 --- a/Makefile.in +++ b/Makefile.in @@ -7,6 +7,7 @@ OBJ := $(abspath $(CURDIR)) ifeq ($(filter s,$(MAKEFLAGS)),s) MAKEFLAGS += --quiet --no-print-directory --quiet? := --quiet +CARGO_BUILD_ARGS := --quiet else MFLAGS += V=1 VERBOSE=1 -v? := -v @@ -56,7 +57,11 @@ DEBUG_FLAGS := -ggdb -ffunction-sections -fdata-sections -fno-omit-frame-poin COMMON_FLAGS = $(DEBUG_FLAGS) $(OPTIMIZE_FLAGS) $(SANITY_FLAGS) -ffile-prefix-map=$(CCACHE_BASEDIR)=. COMMON_FLAGS32 := -mstackrealign COMMON_FLAGS64 := -mcmodel=small -CARGO_BUILD_ARG := --release +CARGO_BUILD_ARGS += --release + +ifneq ($(SUPPRESS_WARNINGS),) + COMMON_FLAGS += -w +endif $(DST_DIR): mkdir -p $@ diff --git a/make/rules-cargo.mk b/make/rules-cargo.mk index ea76678b..d80ff9ed 100644 --- a/make/rules-cargo.mk +++ b/make/rules-cargo.mk @@ -17,7 +17,7 @@ $$(OBJ)/.$(1)-build$(3): $$(filter -j%,$$(MAKEFLAGS)) \ --target "$$(CARGO_TARGET_$(3))" \ --target-dir $$($(2)_OBJ$(3)) \ - $$(CARGO_BUILD_ARG) \ + $$(CARGO_BUILD_ARGS) \ $$($(2)_CARGO_ARGS) \ $$($(2)_CARGO_ARGS$(3)) touch $$@