Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5fca42a7 authored by Matthew Maurer's avatar Matthew Maurer
Browse files

rust: Use wrapper for header file

With the update to C++20, we see warnings for #pragma in a non-header
file. The entry file for a bindgen compilation is not treated as a
header file, which raised this issue.

This approach has the added benefit that rather than using an explicit
filegroup, it uses the headers exported by the library they're binding
against.

Bug: 311052584
Test: mma in binder folder
Change-Id: Ib0456db5a09f7e5225001837977417186db33876
parent 88f1c111
Loading
Loading
Loading
Loading
+0 −5
Original line number Original line Diff line number Diff line
@@ -579,11 +579,6 @@ cc_library {
    ],
    ],
}
}


filegroup {
    name: "libbinder_rpc_unstable_header",
    srcs: ["include_rpc_unstable/binder_rpc_unstable.hpp"],
}

// libbinder historically contained additional interfaces that provided specific
// libbinder historically contained additional interfaces that provided specific
// functionality in the platform but have nothing to do with binder itself. These
// functionality in the platform but have nothing to do with binder itself. These
// are moved out of libbinder in order to avoid the overhead of their vtables.
// are moved out of libbinder in order to avoid the overhead of their vtables.
+1 −1
Original line number Original line Diff line number Diff line
@@ -70,7 +70,7 @@ rust_library {
// TODO(b/184872979): remove once the RPC Binder API is stabilised.
// TODO(b/184872979): remove once the RPC Binder API is stabilised.
rust_bindgen {
rust_bindgen {
    name: "libbinder_rpc_unstable_bindgen",
    name: "libbinder_rpc_unstable_bindgen",
    wrapper_src: ":libbinder_rpc_unstable_header",
    wrapper_src: "BinderBindings.hpp",
    crate_name: "binder_rpc_unstable_bindgen",
    crate_name: "binder_rpc_unstable_bindgen",
    visibility: [":__subpackages__"],
    visibility: [":__subpackages__"],
    source_stem: "bindings",
    source_stem: "bindings",
+1 −0
Original line number Original line Diff line number Diff line
#include <binder_rpc_unstable.hpp>