Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cargo/cargo_build_script.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def _build_script_impl(ctx):
dep_env_out = ctx.actions.declare_file(ctx.label.name + ".depenv")
flags_out = ctx.actions.declare_file(ctx.label.name + ".flags")
link_flags = ctx.actions.declare_file(ctx.label.name + ".linkflags")
manifest_dir = "%s.runfiles/%s" % (script.path, ctx.label.workspace_name or ctx.workspace_name)
manifest_dir = "%s.runfiles/%s/%s" % (script.path, ctx.label.workspace_name or ctx.workspace_name, ctx.label.package)
compilation_mode_opt_level = get_compilation_mode_opts(ctx, toolchain).opt_level

crate_name = ctx.attr.crate_name
Expand Down
2 changes: 1 addition & 1 deletion examples/cargo/build_script.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fn main() {
let bleh = env::var("CARGO_FEATURE_BLEH").unwrap();
let some_env = env::var("SOME_ENV").unwrap();
let out_dir = env::var("OUT_DIR").unwrap();
let data = std::fs::read("cargo/test.txt").unwrap();
let data = std::fs::read("test.txt").unwrap();
assert!(!bleh.is_empty());
assert_eq!(some_env, "42");
println!(r#"cargo:rustc-env=FOO=BAR
Expand Down