blob: 12358885e312f4faf162ae2ebf997369b983e8bd [file] [log] [blame]
// Sysroot Libraries
rustc = "linux-x86/1.49.0/src/stdlibs"
// The basic crates are only available as static libraries
// .rust_sysroot is appended to the name to prevent accidental direct usage
// of these crates by user code.
// The most likely place for this to occur would be liblibc.
rust_defaults {
name: "rust_sysroot_defaults",
no_stdlibs: true,
edition: "2018",
native_coverage: false,
host_supported: true,
sysroot: true,
vendor_available: true,
apex_available: [
"//apex_available:platform",
"//apex_available:anyapex",
],
min_sdk_version: "29",
}
rust_library_rlib {
name: "libcore.rust_sysroot",
defaults: ["rust_sysroot_defaults"],
crate_name: "core",
target: {
linux_glibc_x86_64: {
enabled: false,
},
darwin: {
enabled: false,
},
},
srcs: [rustc + "/library/core/src/lib.rs"],
}
rust_library_rlib {
name: "libbacktrace_sys.rust_sysroot",
defaults: ["rust_sysroot_defaults"],
crate_name: "backtrace_sys",
target: {
linux_glibc_x86_64: {
enabled: false,
},
darwin: {
enabled: false,
},
},
srcs: [rustc + "/library/backtrace/crates/backtrace-sys/src/lib.rs"],
features: [
"core",
"compiler_builtins",
],
rlibs: [
"libcompiler_builtins.rust_sysroot",
"libcore.rust_sysroot",
"liblibc.rust_sysroot",
],
}
rust_library_rlib {
name: "librustc_demangle.rust_sysroot",
defaults: ["rust_sysroot_defaults"],
crate_name: "rustc_demangle",
target: {
linux_glibc_x86_64: {
enabled: false,
},
darwin: {
enabled: false,
},
},
srcs: [rustc + "/vendor/rustc-demangle/src/lib.rs"],
features: [
"core",
"compiler_builtins",
],
rlibs: [
"libcompiler_builtins.rust_sysroot",
"libcore.rust_sysroot",
],
edition: "2015",
}
rust_library_rlib {
name: "libbacktrace_rs.rust_sysroot",
defaults: ["rust_sysroot_defaults"],
crate_name: "backtrace_rs",
target: {
linux_glibc_x86_64: {
enabled: false,
},
darwin: {
enabled: false,
},
},
srcs: [rustc + "/vendor/backtrace/src/lib.rs"],
features: [
"core",
"compiler_builtins",
],
rlibs: [
"libbacktrace_sys.rust_sysroot",
"libcfg_if.rust_sysroot",
"libcompiler_builtins.rust_sysroot",
"libcore.rust_sysroot",
"liblibc.rust_sysroot",
"librustc_demangle.rust_sysroot",
],
}
rust_library_rlib {
name: "libcompiler_builtins.rust_sysroot",
defaults: ["rust_sysroot_defaults"],
crate_name: "compiler_builtins",
target: {
linux_glibc_x86_64: {
enabled: false,
},
darwin: {
enabled: false,
},
},
features: [
"compiler-builtins",
"core",
"default",
],
srcs: [rustc + "/vendor/compiler_builtins/src/lib.rs"],
rlibs: ["libcore.rust_sysroot"],
flags: [
"-C",
"panic=abort",
],
edition: "2015",
}
rust_library_rlib {
name: "liblibc.rust_sysroot",
defaults: ["rust_sysroot_defaults"],
crate_name: "libc",
target: {
linux_glibc_x86_64: {
enabled: false,
},
darwin: {
enabled: false,
},
},
features: ["align"],
srcs: [rustc + "/vendor/libc/src/lib.rs"],
rlibs: [
"libcompiler_builtins.rust_sysroot",
"libcore.rust_sysroot",
],
// Generated via build.rs autodetect on compiler version. May need to be
// regenerated on compiler version bump.
flags: [
"--cfg",
"freebsd11",
"--cfg",
"libc_priv_mod_use",
"--cfg",
"libc_union",
"--cfg",
"libc_const_size_of",
"--cfg",
"libc_align",
"--cfg",
"libc_core_cvoid",
"--cfg",
"libc_packedN",
"--cfg",
"libc_thread_local",
],
edition: "2015",
}
rust_library_rlib {
name: "liballoc.rust_sysroot",
defaults: ["rust_sysroot_defaults"],
crate_name: "alloc",
target: {
linux_glibc_x86_64: {
enabled: false,
},
darwin: {
enabled: false,
},
},
srcs: [rustc + "/library/alloc/src/lib.rs"],
rlibs: [
"libcompiler_builtins.rust_sysroot",
"libcore.rust_sysroot",
],
}
rust_library_rlib {
name: "libcfg_if.rust_sysroot",
defaults: ["rust_sysroot_defaults"],
crate_name: "cfg_if",
target: {
linux_glibc_x86_64: {
enabled: false,
},
darwin: {
enabled: false,
},
},
features: [
"compiler_builtins",
"core",
],
srcs: [rustc + "/vendor/cfg-if/src/lib.rs"],
rlibs: [
"libcompiler_builtins.rust_sysroot",
"libcore.rust_sysroot",
],
}
rust_library_rlib {
name: "libpanic_abort.rust_sysroot",
defaults: ["rust_sysroot_defaults"],
crate_name: "panic_abort",
target: {
linux_glibc_x86_64: {
enabled: false,
},
darwin: {
enabled: false,
},
},
srcs: [rustc + "/library/panic_abort/src/lib.rs"],
rlibs: [
"libcompiler_builtins.rust_sysroot",
"libcore.rust_sysroot",
"libcfg_if.rust_sysroot",
"liblibc.rust_sysroot",
],
}
rust_library_rlib {
name: "libpanic_unwind.rust_sysroot",
defaults: ["rust_sysroot_defaults"],
crate_name: "panic_unwind",
target: {
linux_glibc_x86_64: {
enabled: false,
},
darwin: {
enabled: false,
},
},
srcs: [rustc + "/library/panic_unwind/src/lib.rs"],
rlibs: [
"liballoc.rust_sysroot",
"libcore.rust_sysroot",
"liblibc.rust_sysroot",
"libunwind.rust_sysroot",
"libcompiler_builtins.rust_sysroot",
"libcfg_if.rust_sysroot",
],
}
rust_library_rlib {
name: "libunwind.rust_sysroot",
defaults: ["rust_sysroot_defaults"],
crate_name: "unwind",
target: {
linux_glibc_x86_64: {
enabled: false,
},
darwin: {
enabled: false,
},
},
srcs: [rustc + "/library/unwind/src/lib.rs"],
rlibs: [
"libcompiler_builtins.rust_sysroot",
"libcore.rust_sysroot",
"liblibc.rust_sysroot",
"libcfg_if.rust_sysroot",
],
}
rust_library_rlib {
name: "libhashbrown.rust_sysroot",
defaults: ["rust_sysroot_defaults"],
crate_name: "hashbrown",
target: {
linux_glibc_x86_64: {
enabled: false,
},
darwin: {
enabled: false,
},
},
srcs: [rustc + "/vendor/hashbrown/src/lib.rs"],
features: [
"alloc",
"compiler_builtins",
"core",
"nightly",
"rustc-dep-of-std",
"rustc-internal-api",
],
flags: ["--cfg=has_extern_crate_alloc"],
rlibs: [
"libcore.rust_sysroot",
"libcompiler_builtins.rust_sysroot",
"liballoc.rust_sysroot",
"libunwind.rust_sysroot",
],
}
// Top level sysroot libraries are available both as static and dynamic
rust_library {
name: "libstd",
defaults: ["rust_sysroot_defaults"],
crate_name: "std",
target: {
linux_glibc_x86_64: {
enabled: false,
},
darwin: {
enabled: false,
},
linux_bionic: {
rlibs: ["libpanic_abort.rust_sysroot"],
},
android: {
rlibs: ["libpanic_abort.rust_sysroot"],
},
linux_glibc: {
rlibs: ["libpanic_unwind.rust_sysroot"],
},
},
srcs: [rustc + "/library/std/src/lib.rs"],
features: [
"default",
"std_detect_dlsym_getauxval",
"std_detect_file_io",
"profiler",
],
rlibs: [
"libbacktrace_rs.rust_sysroot",
"libcompiler_builtins.rust_sysroot",
"libcore.rust_sysroot",
"librustc_demangle.rust_sysroot",
"liblibc.rust_sysroot",
"libcfg_if.rust_sysroot",
"liballoc.rust_sysroot",
"libhashbrown.rust_sysroot",
"libunwind.rust_sysroot",
"libprofiler_builtins.rust_sysroot",
],
}
rust_library {
name: "libterm",
defaults: ["rust_sysroot_defaults"],
target: {
linux_glibc_x86_64: {
enabled: false,
},
darwin: {
enabled: false,
},
},
crate_name: "term",
srcs: [rustc + "/library/term/src/lib.rs"],
rustlibs: ["libstd"],
}
rust_library {
name: "libgetopts",
defaults: ["rust_sysroot_defaults"],
crate_name: "getopts",
target: {
linux_glibc_x86_64: {
enabled: false,
},
darwin: {
enabled: false,
},
},
srcs: [rustc + "/vendor/getopts/src/lib.rs"],
rlibs: ["libunicode_width.rust_sysroot"],
rustlibs: ["libstd"],
edition: "2015",
}
rust_library_rlib {
name: "libunicode_width.rust_sysroot",
defaults: ["rust_sysroot_defaults"],
crate_name: "unicode_width",
target: {
linux_glibc_x86_64: {
enabled: false,
},
darwin: {
enabled: false,
},
},
srcs: [rustc + "/vendor/unicode-width/src/lib.rs"],
rustlibs: ["libstd"],
edition: "2015",
}
rust_library {
name: "libtest",
defaults: ["rust_sysroot_defaults"],
crate_name: "test",
target: {
linux_glibc_x86_64: {
enabled: false,
},
darwin: {
enabled: false,
},
},
srcs: [rustc + "/library/test/src/lib.rs"],
rustlibs: [
"libterm",
"libgetopts",
"libstd",
],
rlibs: [
"liblibc.rust_sysroot",
"libcfg_if.rust_sysroot",
],
}
rust_library_rlib {
name: "libprofiler_builtins.rust_sysroot",
defaults: ["rust_sysroot_defaults"],
crate_name: "profiler_builtins",
target: {
linux_glibc_x86_64: {
enabled: false,
},
darwin: {
enabled: false,
},
},
srcs: [rustc + "/library/profiler_builtins/src/lib.rs"],
rlibs: [
"libcompiler_builtins.rust_sysroot",
"libcore.rust_sysroot",
],
}