From 81d0c8ae7fcffb9423cec70947833d3001127c38 Mon Sep 17 00:00:00 2001 From: Jon Cinque Date: Tue, 20 Oct 2020 23:50:34 +0200 Subject: [PATCH] Force unset CARGO to use correct version of cargo (#13027) --- sdk/bpf/rust/build.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sdk/bpf/rust/build.sh b/sdk/bpf/rust/build.sh index db8fbdf199d897..baff4ae7d0a5b8 100755 --- a/sdk/bpf/rust/build.sh +++ b/sdk/bpf/rust/build.sh @@ -34,6 +34,10 @@ export RUSTFLAGS=" -C link-arg=-no-threads \ -C linker=$bpf_sdk/dependencies/llvm-native/bin/ld.lld" +# CARGO may be set if build.sh is run from within cargo, causing +# incompatibilities between cargo and xargo versions +unset CARGO + # Setup xargo export XARGO_HOME="$bpf_sdk/dependencies/xargo" export XARGO_RUST_SRC="$bpf_sdk/dependencies/rust-bpf-sysroot/src"