Skip to content

Commit

Permalink
Add a --sysroot-extra-archives flag for jenkins-cheri-build
Browse files Browse the repository at this point in the history
  • Loading branch information
jrtc27 committed Sep 11, 2024
1 parent 78fe109 commit 648ff0a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pycheribuild/config/jenkinsconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ def __init__(self, loader: ConfigLoaderBase, available_targets: "list[str]") ->
),
help="The path where to extract the sysroot (default=",
)
self.sysroot_extra_archive_names = loader.add_commandline_only_list_option(
"sysroot-extra-archives",
help="Addition archives to extract within the sysroot",
)
self.keep_install_dir = loader.add_commandline_only_bool_option(
"keep-install-dir", help="Don't delete the install dir prior to build"
)
Expand Down
11 changes: 11 additions & 0 deletions pycheribuild/jenkins.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,17 @@ def get_sdk_archives(cheri_config, needs_cheribsd_sysroot: bool) -> "list[SdkArc
if contents.stdout.startswith(b"./"):
warning_message("Old sysroot archive detected, stripping one more path component")
sysroot_archive.extra_args = ["--strip-components", "2"]
for extra_name in cheri_config.sysroot_extra_archive_names:
extra_path = Path(extra_name)
extra_archive = SdkArchive(
cheri_config,
extra_path,
output_dir=cheri_config.sysroot_archive_output_path,
)
if not extra_archive.archive.exists():
fatal_error("Extra archive", extra_archive.archive, "does not exist", pretend=cheri_config.pretend)
else:
all_archives.append(extra_archive)
return all_archives


Expand Down

0 comments on commit 648ff0a

Please sign in to comment.