Skip to content

Commit

Permalink
[CHERI CSA] Add extra_scan_build_args project property
Browse files Browse the repository at this point in the history
  • Loading branch information
eupharina committed Jun 24, 2024
1 parent 7fac0ea commit 71edd05
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pycheribuild/projects/cross/cheribsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]" = []
Expand Down
6 changes: 6 additions & 0 deletions pycheribuild/projects/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1227,6 +1231,8 @@ def _get_scan_build_args(self) -> list[str]:
"--use-cc", commandline_to_str([self.CC]),
"--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(
Expand Down

0 comments on commit 71edd05

Please sign in to comment.