From dd211b316de5f3fc6a88ada95993312e2b4d2aea Mon Sep 17 00:00:00 2001 From: Irina Dudina Date: Wed, 15 May 2024 12:29:08 +0100 Subject: [PATCH] [CHERI CSA] Add extra_scan_build_args project property --- pycheribuild/projects/cross/cheribsd.py | 4 ++++ pycheribuild/projects/project.py | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/pycheribuild/projects/cross/cheribsd.py b/pycheribuild/projects/cross/cheribsd.py index 81b6bb69a..3193b3b78 100644 --- a/pycheribuild/projects/cross/cheribsd.py +++ b/pycheribuild/projects/cross/cheribsd.py @@ -1930,6 +1930,10 @@ def setup_config_options(cls, kernel_only_target=False, install_directory_help=N def can_build_with_csa(cls) -> bool: return True + @classproperty + def extra_scan_build_args(self) -> "list[str]": + return ["-disable-checker", "alpha.core.PointerSub"] + def __init__(self, *args, **kwargs) -> None: super().__init__(*args, **kwargs) self.extra_kernels_with_mfs: "list[str]" = [] diff --git a/pycheribuild/projects/project.py b/pycheribuild/projects/project.py index 6e89604b2..7eafcc2ba 100644 --- a/pycheribuild/projects/project.py +++ b/pycheribuild/projects/project.py @@ -508,6 +508,10 @@ def can_build_with_cfi(self) -> bool: def can_build_with_csa(self) -> bool: return False + @classproperty + def extra_scan_build_args(self) -> "list[str]": + return [] + @classproperty def can_build_with_ccache(self) -> bool: return False @@ -1231,6 +1235,8 @@ def _get_scan_build_args(self) -> "list[str]": "--use-c++", commandline_to_str([self.CXX]), ] + if self.extra_scan_build_args: + scan_build_args = scan_build_args + self.extra_scan_build_args return scan_build_args def _get_make_commandline(