Skip to content

Commit 648ff0a

Browse files
committed
Add a --sysroot-extra-archives flag for jenkins-cheri-build
1 parent 78fe109 commit 648ff0a

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

pycheribuild/config/jenkinsconfig.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ def __init__(self, loader: ConfigLoaderBase, available_targets: "list[str]") ->
133133
),
134134
help="The path where to extract the sysroot (default=",
135135
)
136+
self.sysroot_extra_archive_names = loader.add_commandline_only_list_option(
137+
"sysroot-extra-archives",
138+
help="Addition archives to extract within the sysroot",
139+
)
136140
self.keep_install_dir = loader.add_commandline_only_bool_option(
137141
"keep-install-dir", help="Don't delete the install dir prior to build"
138142
)

pycheribuild/jenkins.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,17 @@ def get_sdk_archives(cheri_config, needs_cheribsd_sysroot: bool) -> "list[SdkArc
168168
if contents.stdout.startswith(b"./"):
169169
warning_message("Old sysroot archive detected, stripping one more path component")
170170
sysroot_archive.extra_args = ["--strip-components", "2"]
171+
for extra_name in cheri_config.sysroot_extra_archive_names:
172+
extra_path = Path(extra_name)
173+
extra_archive = SdkArchive(
174+
cheri_config,
175+
extra_path,
176+
output_dir=cheri_config.sysroot_archive_output_path,
177+
)
178+
if not extra_archive.archive.exists():
179+
fatal_error("Extra archive", extra_archive.archive, "does not exist", pretend=cheri_config.pretend)
180+
else:
181+
all_archives.append(extra_archive)
171182
return all_archives
172183

173184

0 commit comments

Comments
 (0)