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

Commit 4c155eb9 authored by Siarhei Vishniakou's avatar Siarhei Vishniakou
Browse files

Some input build rule fixes

Small fixes in this CL:
* build for host by default
* fix sp::make usage
* add more warnings as errors to match inputflinger

Bug: 271455682
Test: m checkinput
Change-Id: Ib296589b2b2c7c3f5ab178f3b6677be5a6ce1ac1
parent b99b1a0f
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -118,6 +118,11 @@ cc_library {
        "-Wextra",
        "-Werror",
        "-Wno-unused-parameter",
        "-Wthread-safety",
        "-Wshadow",
        "-Wshadow-field-in-constructor-modified",
        "-Wshadow-uncaptured-local",
        "-DANDROID_UTILS_REF_BASE_DISABLE_IMPLICIT_CONSTRUCTION",
    ],
    srcs: [
        "android/os/IInputFlinger.aidl",
@@ -160,6 +165,7 @@ cc_library {
        "liblog",
        "libPlatformProperties",
        "libtinyxml2",
        "libutils",
        "libvintf",
    ],

@@ -196,12 +202,6 @@ cc_library {

    target: {
        android: {
            export_shared_lib_headers: ["libbinder"],

            shared_libs: [
                "libutils",
            ],

            required: [
                "motion_predictor_model_prebuilt",
                "motion_predictor_model_config",
@@ -211,7 +211,6 @@ cc_library {
            include_dirs: [
                "bionic/libc/kernel/android/uapi/",
                "bionic/libc/kernel/uapi",
                "frameworks/native/libs/arect/include",
            ],
        },
    },
+1 −1
Original line number Diff line number Diff line
@@ -409,7 +409,7 @@ status_t InputChannel::openInputChannelPair(const std::string& name,
    setsockopt(sockets[1], SOL_SOCKET, SO_SNDBUF, &bufferSize, sizeof(bufferSize));
    setsockopt(sockets[1], SOL_SOCKET, SO_RCVBUF, &bufferSize, sizeof(bufferSize));

    sp<IBinder> token = new BBinder();
    sp<IBinder> token = sp<BBinder>::make();

    std::string serverChannelName = name + " (server)";
    android::base::unique_fd serverFd(sockets[0]);
+16 −7
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ inputflinger_tidy_checks = [

cc_defaults {
    name: "inputflinger_defaults",
    host_supported: true,
    cpp_std: "c++20",
    cflags: [
        "-Wall",
@@ -50,6 +51,20 @@ cc_defaults {
        "-*", // Disable all checks not explicitly enabled for now
    ] + inputflinger_tidy_checks,
    tidy_checks_as_errors: inputflinger_tidy_checks,
    target: {
        host: {
            sanitize: {
                address: true,
            },
            include_dirs: [
                "bionic/libc/kernel/android/uapi/",
                "bionic/libc/kernel/uapi",
            ],
            cflags: [
                "-D__ANDROID_HOST__",
            ],
        },
    },
}

/////////////////////////////////////////////////
@@ -105,13 +120,6 @@ cc_defaults {
                "libstatspull",
                "libstatssocket",
            ],
            include_dirs: [
                "bionic/libc/kernel/android/uapi/",
                "bionic/libc/kernel/uapi",
            ],
            cflags: [
                "-D__ANDROID_HOST__",
            ],
        },
    },
}
@@ -212,6 +220,7 @@ phony {
        // native targets
        "libgui_test",
        "libinput",
        "libinputreader_static",
        "libinputflinger",
        "inputflinger_tests",
        "inputflinger_benchmarks",
+1 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ cc_benchmark {
    shared_libs: [
        "libbase",
        "libbinder",
        "libbinder_ndk",
        "libcrypto",
        "libcutils",
        "libinputflinger_base",
+0 −12
Original line number Diff line number Diff line
@@ -78,18 +78,6 @@ cc_test {
                "libvintf",
            ],
        },
        host: {
            sanitize: {
                address: true,
            },
            include_dirs: [
                "bionic/libc/kernel/android/uapi/",
                "bionic/libc/kernel/uapi",
            ],
            cflags: [
                "-D__ANDROID_HOST__",
            ],
        },
    },
    sanitize: {
        hwaddress: true,