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

Commit ee205c58 authored by Ivan Lozano's avatar Ivan Lozano Committed by Automerger Merge Worker
Browse files

Merge "rust: Remove libtest from stdlibs list" am: 2bd6cce9

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1768847

Change-Id: Id3c3179072964df7122145bc5012393d3deaf57e
parents 7a1642c4 2bd6cce9
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -101,6 +101,7 @@ func (benchmark *benchmarkDecorator) compilerFlags(ctx ModuleContext, flags Flag
func (benchmark *benchmarkDecorator) compilerDeps(ctx DepsContext, deps Deps) Deps {
	deps = benchmark.binaryDecorator.compilerDeps(ctx, deps)

	deps.Rustlibs = append(deps.Rustlibs, "libtest")
	deps.Rustlibs = append(deps.Rustlibs, "libcriterion")

	return deps
+0 −1
Original line number Diff line number Diff line
@@ -29,7 +29,6 @@ var (
	DefaultEdition     = "2018"
	Stdlibs            = []string{
		"libstd",
		"libtest",
	}

	// Mapping between Soong internal arch types and std::env constants.
+8 −0
Original line number Diff line number Diff line
@@ -169,3 +169,11 @@ func RustTestHostFactory() android.Module {
func (test *testDecorator) stdLinkage(ctx *depsContext) RustLinkage {
	return RlibLinkage
}

func (test *testDecorator) compilerDeps(ctx DepsContext, deps Deps) Deps {
	deps = test.binaryDecorator.compilerDeps(ctx, deps)

	deps.Rustlibs = append(deps.Rustlibs, "libtest")

	return deps
}
+0 −2
Original line number Diff line number Diff line
@@ -170,12 +170,10 @@ func GatherRequiredDepsForTest() string {
			name: "libtest",
			crate_name: "test",
			srcs: ["foo.rs"],
			no_stdlibs: true,
			host_supported: true,
			vendor_available: true,
			vendor_ramdisk_available: true,
			native_coverage: false,
			sysroot: true,
			apex_available: ["//apex_available:platform", "//apex_available:anyapex"],
			min_sdk_version: "29",
		}
+2 −21
Original line number Diff line number Diff line
@@ -569,7 +569,6 @@ func TestVendorSnapshotUse(t *testing.T) {
				],
				rlibs: [
					"libstd",
					"libtest",
					"librust_vendor_available",
				],
				binaries: [
@@ -597,7 +596,6 @@ func TestVendorSnapshotUse(t *testing.T) {
				],
				rlibs: [
					"libstd",
					"libtest",
					"librust_vendor_available",
				],
				binaries: [
@@ -664,22 +662,6 @@ func TestVendorSnapshotUse(t *testing.T) {
		},
	}

	vendor_snapshot_rlib {
		name: "libtest",
		version: "30",
		target_arch: "arm64",
		vendor: true,
		sysroot: true,
		arch: {
			arm64: {
				src: "libtest.rlib",
			},
			arm: {
				src: "libtest.rlib",
			},
		},
	}

	vendor_snapshot_rlib {
		name: "librust_vendor_available",
		version: "30",
@@ -917,7 +899,6 @@ func TestVendorSnapshotUse(t *testing.T) {
		"vendor/lib64.so":                               nil,
		"vendor/liblog.so":                              nil,
		"vendor/libstd.rlib":                            nil,
		"vendor/libtest.rlib":                           nil,
		"vendor/librust_vendor_available.rlib":          nil,
		"vendor/crtbegin_so.o":                          nil,
		"vendor/crtend_so.o":                            nil,
@@ -962,7 +943,7 @@ func TestVendorSnapshotUse(t *testing.T) {
	}

	libclientAndroidMkRlibs := ctx.ModuleForTests("libclient", sharedVariant).Module().(*Module).Properties.AndroidMkRlibs
	if g, w := libclientAndroidMkRlibs, []string{"librust_vendor_available.vendor_rlib.30.arm64.rlib-std", "libstd.vendor_rlib.30.arm64", "libtest.vendor_rlib.30.arm64"}; !reflect.DeepEqual(g, w) {
	if g, w := libclientAndroidMkRlibs, []string{"librust_vendor_available.vendor_rlib.30.arm64.rlib-std", "libstd.vendor_rlib.30.arm64"}; !reflect.DeepEqual(g, w) {
		t.Errorf("wanted libclient libclientAndroidMkRlibs %q, got %q", w, g)
	}

@@ -977,7 +958,7 @@ func TestVendorSnapshotUse(t *testing.T) {
	}

	libclientRustAndroidMkRlibs := ctx.ModuleForTests("libclient_rust", rlibVariant).Module().(*Module).Properties.AndroidMkRlibs
	if g, w := libclientRustAndroidMkRlibs, []string{"librust_vendor_available.vendor_rlib.30.arm64.rlib-std", "libstd.vendor_rlib.30.arm64", "libtest.vendor_rlib.30.arm64"}; !reflect.DeepEqual(g, w) {
	if g, w := libclientRustAndroidMkRlibs, []string{"librust_vendor_available.vendor_rlib.30.arm64.rlib-std", "libstd.vendor_rlib.30.arm64"}; !reflect.DeepEqual(g, w) {
		t.Errorf("wanted libclient libclientAndroidMkRlibs %q, got %q", w, g)
	}