|
@@ -32,6 +32,7 @@ func TestRustBindgen(t *testing.T) {
|
|
|
cflags: ["--clang-flag()"],
|
|
|
shared_libs: ["libfoo_shared"],
|
|
|
static_libs: ["libfoo_static"],
|
|
|
+ header_libs: ["libfoo_header"],
|
|
|
}
|
|
|
cc_library_shared {
|
|
|
name: "libfoo_shared",
|
|
@@ -41,6 +42,10 @@ func TestRustBindgen(t *testing.T) {
|
|
|
name: "libfoo_static",
|
|
|
export_include_dirs: ["static_include"],
|
|
|
}
|
|
|
+ cc_library_headers {
|
|
|
+ name: "libfoo_header",
|
|
|
+ export_include_dirs: ["header_include"],
|
|
|
+ }
|
|
|
cc_defaults {
|
|
|
name: "cc_defaults_flags",
|
|
|
cflags: ["--default-flag"],
|
|
@@ -60,6 +65,9 @@ func TestRustBindgen(t *testing.T) {
|
|
|
if !strings.Contains(libbindgen.Args["cflags"], "-Istatic_include") {
|
|
|
t.Errorf("missing static_libs exported includes in rust_bindgen rule: cflags %#v", libbindgen.Args["cflags"])
|
|
|
}
|
|
|
+ if !strings.Contains(libbindgen.Args["cflags"], "-Iheader_include") {
|
|
|
+ t.Errorf("missing static_libs exported includes in rust_bindgen rule: cflags %#v", libbindgen.Args["cflags"])
|
|
|
+ }
|
|
|
if !strings.Contains(libbindgen.Args["cflags"], "--default-flag") {
|
|
|
t.Errorf("rust_bindgen missing cflags defined in cc_defaults: cflags %#v", libbindgen.Args["cflags"])
|
|
|
}
|