Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit df229cb0 authored by Thiébaud Weksteen's avatar Thiébaud Weksteen
Browse files

Enable size measurement for Rust binaries

Bug: 172339742
Test: m out/soong/binary_sizes.pb
Change-Id: Ibc9feaa1c806b888d8850303ab7eeaf5e5337e35
parent 6d48aad0
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@ bootstrap_go_package {
    deps: [
        "soong",
        "soong-android",
        "soong-bloaty",
        "soong-cc",
        "soong-rust-config",
    ],
+3 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import (
	"github.com/google/blueprint"

	"android/soong/android"
	"android/soong/bloaty"
	"android/soong/rust/config"
)

@@ -249,6 +250,8 @@ func transformSrctoCrate(ctx ModuleContext, main android.Path, deps PathDeps, fl
		implicits = append(implicits, clippyFile)
	}

	bloaty.MeasureSizeForPath(ctx, outputFile)

	ctx.Build(pctx, android.BuildParams{
		Rule:            rustc,
		Description:     "rustc " + main.Rel(),