def extract_sdk_archives(cheriConfig, archives: "typing.List[SdkArchive]"):
if cheriConfig.sdkBinDir.is_dir():
statusUpdate(cheriConfig.sdkBinDir, "already exists, not extracting SDK archives")
return
cheriConfig.FS.makedirs(cheriConfig.sdkDir)
for archive in archives:
archive.extract()
if not cheriConfig.sdkBinDir.exists():
fatalError("SDK bin dir does not exist after extracting sysroot archives!")
# Use the host ar/ranlib if they are missing
for tool in ("ar", "ranlib"):
if not (cheriConfig.sdkDir / "bin" / tool).exists():
cheriConfig.FS.createSymlink(Path(shutil.which(tool)), cheriConfig.sdkBinDir / tool, relative=False)
cheriConfig.FS.createBuildtoolTargetSymlinks(cheriConfig.sdkBinDir / tool)
评论列表
文章目录