Merge "Introduce minimal static libc for baremetal Rust"

This commit is contained in:
Treehugger Robot 2022-12-15 00:22:20 +00:00 committed by Gerrit Code Review
commit 746ed77a29

View file

@ -2259,6 +2259,37 @@ cc_library_static {
defaults: ["crt_and_memtag_defaults"],
}
// ========================================================
// libc dependencies for baremetal Rust projects.
// ========================================================
cc_defaults {
name: "librust_baremetal_defaults",
header_libs: ["libc_headers"],
include_dirs: [
"bionic/libc/async_safe/include",
"bionic/libc/platform",
],
cflags: [
"-Wall",
"-Werror",
],
system_shared_libs: [],
nocrt: true,
stl: "none",
}
cc_library_static {
name: "librust_baremetal",
defaults: ["librust_baremetal_defaults"],
whole_static_libs: [
"libarm-optimized-routines-mem",
],
visibility: [
"//packages/modules/Virtualization/vmbase",
],
}
// ========================================================
// NDK headers.
// ========================================================