Skip to content
This repository was archived by the owner on Jul 11, 2023. It is now read-only.

Commit e1e3c1b

Browse files
authored
Merge pull request #67 from alessandrod/master
cargo-bpf: fix for rustc >= 1.45
2 parents cec92fa + 4b0962b commit e1e3c1b

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

cargo-bpf/src/build.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,15 @@ fn build_probe(cargo: &Path, package: &Path, target_dir: &Path, probe: &str) ->
135135
let _ = fs::remove_dir_all(&artifacts_dir);
136136
fs::create_dir_all(&artifacts_dir)?;
137137

138+
let mut flags = String::new();
139+
if let Ok(rf) = std::env::var("RUSTFLAGS") {
140+
flags.push_str(&rf);
141+
}
142+
flags.push_str(" -C embed-bitcode=yes");
143+
138144
if !Command::new(cargo)
139145
.current_dir(package)
146+
.env("RUSTFLAGS", flags)
140147
.args("rustc --release --features=probes".split(" "))
141148
.arg("--target-dir")
142149
.arg(target_dir.to_str().unwrap())

0 commit comments

Comments
 (0)