Skip to contentSkip to conversation

package/pkg-cargo: fix debug build

PATCH Applied Fabrice Fontaine 2 participants 2 messages Jan 29, 2022 – Jan 30, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/pkg-cargo: fix debug build

There is no --debug mode for cargo resulting in the following build failure in ripgrep since its conversion to cargo infrastructure in commit 342fd3e7350479dc368541ac77a5130ebb53194c:

error: Found argument '--debug' which wasn't expected, or isn't valid in this context

Fixes:
- http://autobuild.buildroot.org/results/772ebdd6a39950457a59419bdc1376cb0e0a3611

---
 package/pkg-cargo.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/pkg-cargo.mk +1 -1
index 614d46ad64..e74a8358bc 100644
@@ -104,7 +104,7 @@ define $(2)_BUILD_CMDS
 		$$($(2)_CARGO_ENV) \
 		cargo build \
 			--offline \
-			$$(if $$(BR2_ENABLE_DEBUG),--debug,--release) \
+			$$(if $$(BR2_ENABLE_DEBUG),,--release) \
 			--manifest-path Cargo.toml \
 			--locked \
 			$$($(2)_CARGO_BUILD_OPTS)
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 6 lines · On Sat, 29 Jan 2022 10:42:22 +0100 Fabrice Fontaine…

There is no --debug mode for cargo resulting in the following build failure in ripgrep since its conversion to cargo infrastructure in commit 342fd3e7350479dc368541ac77a5130ebb53194c:

error: Found argument '--debug' which wasn't expected, or isn't valid in this context

Quoted 7 lines

Fixes:
- http://autobuild.buildroot.org/results/772ebdd6a39950457a59419bdc1376cb0e0a3611

---
 package/pkg-cargo.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied to master, thanks.

However, I'm wondering if we shouldn't instead use:

--profile=release

and

--profile=dev

See https://doc.rust-lang.org/cargo/reference/profiles.html

Best regards,

Thomas

Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot