Revert "support sandboxed rust rules"

Revert submission 2629131-sandbox-rust-inputs

Reason for revert: Fail on android build.

Reverted changes: /q/submissionid:2629131-sandbox-rust-inputs

Change-Id: Ifd9aa46e80a12d8f4ffa0a2daa74b96727cbb7e6
This commit is contained in:
Wen-yi Chu
2023-09-22 03:58:59 +00:00
parent df0ed707a5
commit 41326c1f41
28 changed files with 383 additions and 1402 deletions

View File

@@ -52,22 +52,6 @@ var PrepareForTestWithRustIncludeVndk = android.GroupFixturePreparers(
func GatherRequiredDepsForTest() string {
bp := `
prebuilt_build_tool {
name: "rustc",
src: "linux-x86/1.69.0/bin/rustc",
deps: [
"linux-x86/1.69.0/lib/libstd.so",
"linux-x86/1.69.0/lib64/libc++.so.1",
],
}
prebuilt_build_tool {
name: "clippy-driver",
src: "linux-x86/1.69.0/bin/clippy-driver",
}
prebuilt_build_tool {
name: "rustdoc",
src: "linux-x86/1.69.0/bin/rustdoc",
}
rust_prebuilt_library {
name: "libstd",
crate_name: "std",
@@ -79,25 +63,6 @@ func GatherRequiredDepsForTest() string {
},
host_supported: true,
sysroot: true,
rlibs: [
"libaddr2line",
"libadler",
"liballoc",
"libcfg_if",
"libcompiler_builtins",
"libcore",
"libgimli",
"libhashbrown",
"liblibc",
"libmemchr",
"libminiz_oxide",
"libobject",
"libpanic_unwind",
"librustc_demangle",
"librustc_std_workspace_alloc",
"librustc_std_workspace_core",
"libstd_detect",
],
}
//////////////////////////////
// Device module requirements
@@ -134,278 +99,6 @@ func GatherRequiredDepsForTest() string {
nocrt: true,
system_shared_libs: [],
}
rust_library_rlib {
name: "libaddr2line",
crate_name: "addr2line",
enabled:true,
srcs: ["foo.rs"],
no_stdlibs: true,
product_available: true,
host_supported: true,
vendor_available: true,
vendor_ramdisk_available: true,
recovery_available: true,
native_coverage: false,
sysroot: true,
apex_available: ["//apex_available:platform", "//apex_available:anyapex"],
min_sdk_version: "29",
}
rust_library_rlib {
name: "libadler",
crate_name: "adler",
enabled:true,
srcs: ["foo.rs"],
no_stdlibs: true,
product_available: true,
host_supported: true,
vendor_available: true,
vendor_ramdisk_available: true,
recovery_available: true,
native_coverage: false,
sysroot: true,
apex_available: ["//apex_available:platform", "//apex_available:anyapex"],
min_sdk_version: "29",
}
rust_library_rlib {
name: "liballoc",
crate_name: "alloc",
enabled:true,
srcs: ["foo.rs"],
no_stdlibs: true,
product_available: true,
host_supported: true,
vendor_available: true,
vendor_ramdisk_available: true,
recovery_available: true,
native_coverage: false,
sysroot: true,
apex_available: ["//apex_available:platform", "//apex_available:anyapex"],
min_sdk_version: "29",
}
rust_library_rlib {
name: "libcfg_if",
crate_name: "cfg_if",
enabled:true,
srcs: ["foo.rs"],
no_stdlibs: true,
product_available: true,
host_supported: true,
vendor_available: true,
vendor_ramdisk_available: true,
recovery_available: true,
native_coverage: false,
sysroot: true,
apex_available: ["//apex_available:platform", "//apex_available:anyapex"],
min_sdk_version: "29",
}
rust_library_rlib {
name: "libcompiler_builtins",
crate_name: "compiler_builtins",
enabled:true,
srcs: ["foo.rs"],
no_stdlibs: true,
product_available: true,
host_supported: true,
vendor_available: true,
vendor_ramdisk_available: true,
recovery_available: true,
native_coverage: false,
sysroot: true,
apex_available: ["//apex_available:platform", "//apex_available:anyapex"],
min_sdk_version: "29",
}
rust_library_rlib {
name: "libcore",
crate_name: "core",
enabled:true,
srcs: ["foo.rs"],
no_stdlibs: true,
product_available: true,
host_supported: true,
vendor_available: true,
vendor_ramdisk_available: true,
recovery_available: true,
native_coverage: false,
sysroot: true,
apex_available: ["//apex_available:platform", "//apex_available:anyapex"],
min_sdk_version: "29",
}
rust_library_rlib {
name: "libgimli",
crate_name: "gimli",
enabled:true,
srcs: ["foo.rs"],
no_stdlibs: true,
product_available: true,
host_supported: true,
vendor_available: true,
vendor_ramdisk_available: true,
recovery_available: true,
native_coverage: false,
sysroot: true,
apex_available: ["//apex_available:platform", "//apex_available:anyapex"],
min_sdk_version: "29",
}
rust_library_rlib {
name: "libhashbrown",
crate_name: "hashbrown",
enabled:true,
srcs: ["foo.rs"],
no_stdlibs: true,
product_available: true,
host_supported: true,
vendor_available: true,
vendor_ramdisk_available: true,
recovery_available: true,
native_coverage: false,
sysroot: true,
apex_available: ["//apex_available:platform", "//apex_available:anyapex"],
min_sdk_version: "29",
}
rust_library_rlib {
name: "liblibc",
crate_name: "libc",
enabled:true,
srcs: ["foo.rs"],
no_stdlibs: true,
product_available: true,
host_supported: true,
vendor_available: true,
vendor_ramdisk_available: true,
recovery_available: true,
native_coverage: false,
sysroot: true,
apex_available: ["//apex_available:platform", "//apex_available:anyapex"],
min_sdk_version: "29",
}
rust_library_rlib {
name: "libmemchr",
crate_name: "memchr",
enabled:true,
srcs: ["foo.rs"],
no_stdlibs: true,
product_available: true,
host_supported: true,
vendor_available: true,
vendor_ramdisk_available: true,
recovery_available: true,
native_coverage: false,
sysroot: true,
apex_available: ["//apex_available:platform", "//apex_available:anyapex"],
min_sdk_version: "29",
}
rust_library_rlib {
name: "libminiz_oxide",
crate_name: "miniz_oxide",
enabled:true,
srcs: ["foo.rs"],
no_stdlibs: true,
product_available: true,
host_supported: true,
vendor_available: true,
vendor_ramdisk_available: true,
recovery_available: true,
native_coverage: false,
sysroot: true,
apex_available: ["//apex_available:platform", "//apex_available:anyapex"],
min_sdk_version: "29",
}
rust_library_rlib {
name: "libobject",
crate_name: "object",
enabled:true,
srcs: ["foo.rs"],
no_stdlibs: true,
product_available: true,
host_supported: true,
vendor_available: true,
vendor_ramdisk_available: true,
recovery_available: true,
native_coverage: false,
sysroot: true,
apex_available: ["//apex_available:platform", "//apex_available:anyapex"],
min_sdk_version: "29",
}
rust_library_rlib {
name: "libpanic_unwind",
crate_name: "panic_unwind",
enabled:true,
srcs: ["foo.rs"],
no_stdlibs: true,
product_available: true,
host_supported: true,
vendor_available: true,
vendor_ramdisk_available: true,
recovery_available: true,
native_coverage: false,
sysroot: true,
apex_available: ["//apex_available:platform", "//apex_available:anyapex"],
min_sdk_version: "29",
}
rust_library_rlib {
name: "librustc_demangle",
crate_name: "rustc_demangle",
enabled:true,
srcs: ["foo.rs"],
no_stdlibs: true,
product_available: true,
host_supported: true,
vendor_available: true,
vendor_ramdisk_available: true,
recovery_available: true,
native_coverage: false,
sysroot: true,
apex_available: ["//apex_available:platform", "//apex_available:anyapex"],
min_sdk_version: "29",
}
rust_library_rlib {
name: "librustc_std_workspace_alloc",
crate_name: "rustc_std_workspace_alloc",
enabled:true,
srcs: ["foo.rs"],
no_stdlibs: true,
product_available: true,
host_supported: true,
vendor_available: true,
vendor_ramdisk_available: true,
recovery_available: true,
native_coverage: false,
sysroot: true,
apex_available: ["//apex_available:platform", "//apex_available:anyapex"],
min_sdk_version: "29",
}
rust_library_rlib {
name: "librustc_std_workspace_core",
crate_name: "rustc_std_workspace_core",
enabled:true,
srcs: ["foo.rs"],
no_stdlibs: true,
product_available: true,
host_supported: true,
vendor_available: true,
vendor_ramdisk_available: true,
recovery_available: true,
native_coverage: false,
sysroot: true,
apex_available: ["//apex_available:platform", "//apex_available:anyapex"],
min_sdk_version: "29",
}
rust_library_rlib {
name: "libstd_detect",
crate_name: "std_detect",
enabled:true,
srcs: ["foo.rs"],
no_stdlibs: true,
product_available: true,
host_supported: true,
vendor_available: true,
vendor_ramdisk_available: true,
recovery_available: true,
native_coverage: false,
sysroot: true,
apex_available: ["//apex_available:platform", "//apex_available:anyapex"],
min_sdk_version: "29",
}
rust_library {
name: "libstd",
crate_name: "std",
@@ -420,25 +113,6 @@ func GatherRequiredDepsForTest() string {
sysroot: true,
apex_available: ["//apex_available:platform", "//apex_available:anyapex"],
min_sdk_version: "29",
rlibs: [
"libaddr2line",
"libadler",
"liballoc",
"libcfg_if",
"libcompiler_builtins",
"libcore",
"libgimli",
"libhashbrown",
"liblibc",
"libmemchr",
"libminiz_oxide",
"libobject",
"libpanic_unwind",
"librustc_demangle",
"librustc_std_workspace_alloc",
"librustc_std_workspace_core",
"libstd_detect",
],
}
rust_library {
name: "libtest",