Skip to content

Commit 0878b53

Browse files
fmeumclaude
andcommitted
Handle root_symlinks and symlinks in OSS-Fuzz packaging
Bazel 9 provides the bash runfiles library via root_symlinks instead of regular runfiles. The OSS-Fuzz packaging rule only iterated over runfiles.files, missing root_symlinks entries entirely and causing "cannot find runfiles.bash" errors at runtime. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 7d94442 commit 0878b53

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

fuzzing/private/oss_fuzz/package.bzl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,21 @@ def _oss_fuzz_package_impl(ctx):
3939
for runfile in binary_runfiles
4040
if runfile != binary_info.binary_file and not runfile_path(ctx, runfile).startswith(local_jdk_prefix)
4141
])
42+
43+
for symlink in binary_info.binary_runfiles.root_symlinks.to_list():
44+
archive_inputs.append(symlink.target_file)
45+
runfiles_manifest_content += "{path} {real_path}\n".format(
46+
path = symlink.path,
47+
real_path = symlink.target_file.path,
48+
)
49+
50+
for symlink in binary_info.binary_runfiles.symlinks.to_list():
51+
archive_inputs.append(symlink.target_file)
52+
runfiles_manifest_content += "{path} {real_path}\n".format(
53+
path = ctx.workspace_name + "/" + symlink.path,
54+
real_path = symlink.target_file.path,
55+
)
56+
4257
ctx.actions.write(runfiles_manifest, runfiles_manifest_content, False)
4358
archive_inputs.append(runfiles_manifest)
4459

0 commit comments

Comments
 (0)