Add -nostdlibinc to bindgen's device cflags.
-nostdlibinc was removed from DeviceGlobalCflags so that building
against the NDK could use --sysroot. It was added back manually to
non-NDK device compiles of C/C++ code, but missed that rust bindgen
compiles also used DeviceGlobalCflags. Add -nostdlibinc to bindgen's
device cflags.
Bug: 374130155
Change-Id: I1c635d9d6a72e447931b46a60c79ac1dd4da699c
Test: manual
Flag: EXEMPT refactor
diff --git a/rust/bindgen.go b/rust/bindgen.go
index abb5181..3944495 100644
--- a/rust/bindgen.go
+++ b/rust/bindgen.go
@@ -186,7 +186,7 @@
// Default clang flags
cflags = append(cflags, "${cc_config.CommonGlobalCflags}")
if ctx.Device() {
- cflags = append(cflags, "${cc_config.DeviceGlobalCflags}")
+ cflags = append(cflags, "${cc_config.DeviceGlobalCflags}", "-nostdlibinc")
}
// Toolchain clang flags