From 004bd3f526714343209397881c81f857212a6967 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Mon, 2 Oct 2023 11:39:17 -0700 Subject: Revert "Split Rust crate builds into compile and link phases." This reverts commit e7c71c344d462cac998b37d551bd78baa892082d. The intermediates created by the separated rust compile steps are very large, on the order of 60GB. This is more than CI can support for now, revert the split into compile and link phases. This comes at the expense of incremental build time, especially when modifying C/C++ sources that are dependencies of rust modules. Bug: 293349612 Test: builds Change-Id: I81169e7d0727330c8de5e7688dcdc87fe7b8d3b5 --- rust/binary_test.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'rust/binary_test.go') diff --git a/rust/binary_test.go b/rust/binary_test.go index dff94ac95..ef9303768 100644 --- a/rust/binary_test.go +++ b/rust/binary_test.go @@ -150,7 +150,7 @@ func TestBootstrap(t *testing.T) { bootstrap: true, }`) - foo := ctx.ModuleForTests("foo", "android_arm64_armv8-a").Rule("rustLink") + foo := ctx.ModuleForTests("foo", "android_arm64_armv8-a").Rule("rustc") flag := "-Wl,-dynamic-linker,/system/bin/bootstrap/linker64" if !strings.Contains(foo.Args["linkFlags"], flag) { @@ -167,11 +167,10 @@ func TestStaticBinaryFlags(t *testing.T) { }`) fizzOut := ctx.ModuleForTests("fizz", "android_arm64_armv8-a").Rule("rustc") - fizzOutLink := ctx.ModuleForTests("fizz", "android_arm64_armv8-a").Rule("rustLink") fizzMod := ctx.ModuleForTests("fizz", "android_arm64_armv8-a").Module().(*Module) flags := fizzOut.Args["rustcFlags"] - linkFlags := fizzOutLink.Args["linkFlags"] + linkFlags := fizzOut.Args["linkFlags"] if !strings.Contains(flags, "-C relocation-model=static") { t.Errorf("static binary missing '-C relocation-model=static' in rustcFlags, found: %#v", flags) } @@ -201,7 +200,7 @@ func TestLinkObjects(t *testing.T) { name: "libfoo", }`) - fizzBuzz := ctx.ModuleForTests("fizz-buzz", "android_arm64_armv8-a").Rule("rustLink") + fizzBuzz := ctx.ModuleForTests("fizz-buzz", "android_arm64_armv8-a").Rule("rustc") linkFlags := fizzBuzz.Args["linkFlags"] if !strings.Contains(linkFlags, "/libfoo.so") { t.Errorf("missing shared dependency 'libfoo.so' in linkFlags: %#v", linkFlags) -- cgit v1.2.3-59-g8ed1b