Merge "rust: Remove libtest from stdlibs list"
This commit is contained in:
@@ -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
|
||||
|
@@ -29,7 +29,6 @@ var (
|
||||
DefaultEdition = "2018"
|
||||
Stdlibs = []string{
|
||||
"libstd",
|
||||
"libtest",
|
||||
}
|
||||
|
||||
// Mapping between Soong internal arch types and std::env constants.
|
||||
|
@@ -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
|
||||
}
|
||||
|
@@ -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",
|
||||
}
|
||||
|
@@ -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)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user