Ensure hermetic device rust_bindgen.
rust_bindgen was not hermetic previously as it would pull in host headers for device targets. This fixes that by using the same flags we use when compiling with Clang. This also makes sure our rust_bindgen headers are built as similar as possible to their respective cc_libraries. This also pulls in the bionic dependencies as well, which provide the headers required for device targets. Bug: 162007475 Test: device rust_bindgen deps file does not reference host headers. Change-Id: I4efdf333e011a6c6d73a0345e5485823f166d17a
This commit is contained in:
@@ -48,9 +48,9 @@ func TestRustBindgen(t *testing.T) {
|
||||
t.Errorf("missing clang cflags in rust_bindgen rule: cflags %#v", libbindgen.Args["cflags"])
|
||||
}
|
||||
if !strings.Contains(libbindgen.Args["cflags"], "-Ishared_include") {
|
||||
t.Errorf("missing clang cflags in rust_bindgen rule: cflags %#v", libbindgen.Args["cflags"])
|
||||
t.Errorf("missing shared_libs exported includes in rust_bindgen rule: cflags %#v", libbindgen.Args["cflags"])
|
||||
}
|
||||
if !strings.Contains(libbindgen.Args["cflags"], "-Istatic_include") {
|
||||
t.Errorf("missing clang cflags in rust_bindgen rule: cflags %#v", libbindgen.Args["cflags"])
|
||||
t.Errorf("missing static_libs exported includes in rust_bindgen rule: cflags %#v", libbindgen.Args["cflags"])
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user