Skip to content

Add ASAN build rules#6

Open
croos12 wants to merge 4 commits intomasterfrom
croos-asan-build
Open

Add ASAN build rules#6
croos12 wants to merge 4 commits intomasterfrom
croos-asan-build

Conversation

@croos12
Copy link
Copy Markdown
Owner

@croos12 croos12 commented Mar 6, 2026

Adds a separate ASAN swss build package to be created as the target when DEB_BUILD_PROFILES=asan. This is required for Clobbering of ASAN after a standard swss build on the same build machine.

Signed-off-by: Connor Roos <[email protected]>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Debian packaging support to build an ASAN-instrumented variant of the SWSS packages, aligning build outputs with an asan build profile and updating install/strip rules accordingly.

Changes:

  • Introduces swss-asan and swss-dbg-asan binary packages gated by Debian build profiles.
  • Updates debian/rules to install/strip into package-name-specific directories based on an ENABLE_ASAN toggle.
  • Adds conflicts/build-profile metadata to prevent ASAN and non-ASAN packages from being built/installed together.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
debian/rules Switches install destdir and dbg-package name to swss(-dbg)-asan when ASAN is enabled.
debian/control Adds ASAN-specific binary package stanzas and uses Build-Profiles to select ASAN vs non-ASAN packages.

Comment thread debian/rules Outdated
Comment thread debian/control
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

Comment thread debian/swss-asan.install
Comment thread debian/rules
Signed-off-by: Connor Roos <[email protected]>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

Comment thread debian/rules
Comment on lines 30 to 33
configure_opts =
ifeq ($(ENABLE_ASAN), y)
ifneq ($(filter asan,$(DEB_BUILD_PROFILES)),)
configure_opts += --enable-asan
endif
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ASAN toggle was changed to only look at DEB_BUILD_PROFILES (ifneq ($(filter asan,$(DEB_BUILD_PROFILES)),)). The repo’s CI still enables ASAN by exporting ENABLE_ASAN=y (see .azure-pipelines/build-template.yml:252), so with this change the build will no longer pass --enable-asan unless the pipeline is updated to set DEB_BUILD_PROFILES=asan. Consider supporting both mechanisms (e.g., treat ENABLE_ASAN=y as enabling the asan profile) or updating the build pipeline in the same PR to avoid silently dropping ASAN builds.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants