Skip to content

Commit bdb434f

Browse files
committed
Add debugging information.
1 parent ef0bf46 commit bdb434f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

rust/private/rustc.bzl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,11 @@ def collect_deps(deps, toolchain):
118118
staticlibs = [l for l in libs.to_list() if l.basename.endswith(toolchain.staticlib_ext)]
119119
transitive_dylibs = depset(transitive = [transitive_dylibs, depset(dylibs)])
120120
transitive_staticlibs = depset(transitive = [transitive_staticlibs, depset(staticlibs)])
121+
print("All libs: " + str(libs.to_list()))
122+
print("Looking for dylibs (libs with extension: " + toolchain.dylib_ext + ")")
123+
print("Looking for static libs (libs with extension:" + toolchain.staticlib_ext + ")")
124+
print("Transitive dylibs: " + str(transitive_dylibs.to_list()))
125+
print("Transitive staticlibs: " + str(transitive_staticlibs.to_list()))
121126
else:
122127
fail("rust targets can only depend on rust_library, rust_*_library or cc_library targets." + str(dep), "deps")
123128

@@ -316,6 +321,9 @@ def rustc_compile_action(
316321
mnemonic = "Rustc",
317322
progress_message = "Compiling Rust {} {} ({} files)".format(crate_info.type, ctx.label.name, len(crate_info.srcs)),
318323
)
324+
325+
print("Runfiles (dylibs): " + str(dep_info.transitive_dylibs.to_list()))
326+
print("Runfiles (data): " + str(getattr(ctx.files, "data", [])))
319327
runfiles = ctx.runfiles(
320328
files = dep_info.transitive_dylibs.to_list() + getattr(ctx.files, "data", []),
321329
collect_data = True,

0 commit comments

Comments
 (0)