From: Peter Michael Green Date: Thu, 22 Oct 2020 19:43:09 +0000 (+0000) Subject: Use the compiler itself rather than dpkg to detect DEB_BUILD_RUST_TYPE X-Git-Tag: archive/raspbian/1.41.1+dfsg1-1_deb10u1+rpi1~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=70ec98917a1f666c822e6adacac9d69559b5cd70;p=rustc.git Use the compiler itself rather than dpkg to detect DEB_BUILD_RUST_TYPE --- diff --git a/debian/architecture.mk b/debian/architecture.mk index 9224354594..fb41c65698 100644 --- a/debian/architecture.mk +++ b/debian/architecture.mk @@ -14,4 +14,4 @@ ifeq ($(DEB_TARGET_RUST_TYPE),-unknown-) DEB_TARGET_RUST_TYPE = $(DEB_HOST_RUST_TYPE) endif -DEB_BUILD_RUST_TYPE = $(shell dpkg -L rustc | grep '/usr/lib/rustlib/' | head -n 1 | cut -d '/' -f 5) +DEB_BUILD_RUST_TYPE = $(shell RUSTC_BOOTSTRAP=1 rustc -Z unstable-options --print target-spec-json | python3 -c 'import json,sys;obj=json.load(sys.stdin);print(obj["llvm-target"])')