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.
This commit is contained in:
Arkadiusz Hiler 2023-07-05 14:32:24 +03:00
parent 37cf4d2086
commit 7c21be5c27
2 changed files with 7 additions and 2 deletions

View File

@ -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 $@

View File

@ -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 $$@