Skip to contentSkip to conversation

package/{rust, rust-bin}: install rustfmt

PATCH New Bernd Kuhls 1 participant 1 message Feb 7

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 package/{rust, rust-bin}: install rustfmt

From: El Mehdi YOUNES <[email protected]>

Rust-for-Linux expects rustfmt to be available; otherwise the kernel emits a "rustfmt not found" warning and the generated bindings are not correct. Provide rustfmt from rust-bin by adding it to the installed components.

Note: the dist tarball exposes the component as "rustfmt-preview" (as listed in 'components' file), so we use that name.

[Bernd: added rustfmt-preview to rust package
Fixes mesa3d warning:
Failed to run rustfmt: No such file or directory (os error 2) (non-fatal, continuing)]

---
v2: Added rustfmt-preview to rust package as well (Thomas)

 package/rust-bin/rust-bin.mk | 2 +-
 package/rust/rust.mk         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
package/rust-bin/rust-bin.mk +1 -1
index db7d4a1cae..fd72bef8fc 100644
@@ -40,7 +40,7 @@ HOST_RUST_BIN_INSTALL_COMMON_OPTS = \
 
 HOST_RUST_BIN_INSTALL_OPTS = \
 	$(HOST_RUST_BIN_INSTALL_COMMON_OPTS) \
-	--components=rustc,cargo,rust-std-$(RUSTC_HOST_NAME)
+	--components=rustc,cargo,rust-std-$(RUSTC_HOST_NAME),rustfmt-preview
 
 define HOST_RUST_BIN_INSTALL_RUSTC
 	(cd $(@D); \
package/rust/rust.mk +1 -1
index f9889e3931..bffbe63d6f 100644
@@ -66,7 +66,7 @@ HOST_RUST_INSTALL_OPTS = \
 
 define HOST_RUST_INSTALL_RUSTC
 	cd $(@D)/build/tmp/tarball/rust/$(RUSTC_HOST_NAME)/rust-$(RUST_VERSION)-$(RUSTC_HOST_NAME); \
-		./install.sh $(HOST_RUST_INSTALL_OPTS) --components=rustc,cargo,rust-std-$(RUSTC_HOST_NAME)
+		./install.sh $(HOST_RUST_INSTALL_OPTS) --components=rustc,cargo,rust-std-$(RUSTC_HOST_NAME),rustfmt-preview
 endef
 
 ifeq ($(BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS),y)
Signature · 6 lines
2.47.3

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot