[build][asan] make dpkg cache asan-aware (#10750)

Currently, the build with ASAN_ENABLE=y reuses the packages built with
ASAN_ENABLE=n (and vice versa). To address this issue, ASAN_ENABLE is added to DEP_FLAGS for asan-enabled packages (docker-syncd-mlnx, syncd, docker-orchagent, swss).

- Why I did it
To make dpkg cache use/rebuild the packages for ASAN_ENABLE=y/n.

- How I did it
Added ASAN_ENABLE to the DEP_FLAGS for asan-enabled packages.

- How to verify it
Built with ASAN_ENABLE=y/n and checked the .flags .log files.

Signed-off-by: Yakiv Huryk <yhuryk@nvidia.com>
This commit is contained in:
Yakiv Huryk 2022-05-31 11:15:44 +03:00 committed by GitHub
parent bd91b2eef3
commit 7306d68411
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View File

@ -6,7 +6,7 @@ DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
DEP_FILES += $(shell git ls-files -- $(DPATH))
$(DOCKER_SYNCD_BASE)_CACHE_MODE := GIT_CONTENT_SHA
$(DOCKER_SYNCD_BASE)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(DOCKER_SYNCD_BASE)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) $(ENABLE_ASAN)
$(DOCKER_SYNCD_BASE)_DEP_FILES := $(DEP_FILES)
$(eval $(call add_dbg_docker,$(DOCKER_SYNCD_BASE),$(DOCKER_SYNCD_BASE_DBG)))

View File

@ -5,7 +5,7 @@ DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
DEP_FILES += $(shell git ls-files $(DPATH))
$(DOCKER_ORCHAGENT)_CACHE_MODE := GIT_CONTENT_SHA
$(DOCKER_ORCHAGENT)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(DOCKER_ORCHAGENT)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) $(ENABLE_ASAN)
$(DOCKER_ORCHAGENT)_DEP_FILES := $(DEP_FILES)
$(eval $(call add_dbg_docker,$(DOCKER_ORCHAGENT),$(DOCKER_ORCHAGENT_DBG)))

View File

@ -5,7 +5,7 @@ DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
SMDEP_FILES := $(addprefix $(SPATH)/,$(shell cd $(SPATH) && git ls-files))
$(SWSS)_CACHE_MODE := GIT_CONTENT_SHA
$(SWSS)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(SWSS)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) $(ENABLE_ASAN)
$(SWSS)_DEP_FILES := $(DEP_FILES)
$(SWSS)_SMDEP_FILES := $(SMDEP_FILES)
$(SWSS)_SMDEP_PATHS := $(SPATH)

View File

@ -12,7 +12,7 @@ $(foreach path, $(SMDEP_PATHS), $(eval $(path) :=$(filter-out $(SMDEP_PATHS),$(a
$(SYNCD)_CACHE_MODE := GIT_CONTENT_SHA
$(SYNCD)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
$(SYNCD)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) $(ENABLE_ASAN)
$(SYNCD)_DEP_FILES := $(DEP_FILES)
$(SYNCD)_SMDEP_FILES := $(foreach path, $(SMDEP_PATHS), $($(path)))
$(SYNCD)_SMDEP_PATHS := $(SMDEP_PATHS)