-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add libuv support as a replacement of systemd + some CMake fixes #420
Conversation
Signed-off-by: Athaariq Ardhiansyah <[email protected]>
The option() function only dedicated for boolean type. For enumerated string, better use both set(... CACHE STRING ...) and set_property(CACHE ... PROPERTY STRINGS ...). Signed-off-by: Athaariq Ardhiansyah <[email protected]>
For further information, visit the documentation at https://cmake.org/cmake/help/latest/command/set.html#set-cache-entry Signed-off-by: Athaariq Ardhiansyah <[email protected]>
This commit prevents other new contributors from mistakenly blame CMakeLists.txt. Therefore, I added a warning just in case they forgot to turn on BUILD_ELINUX_SO while modifying BACKEND_TYPE. Signed-off-by: Athaariq Ardhiansyah <[email protected]>
Signed-off-by: Athaariq Ardhiansyah <[email protected]>
Not all embedded systems can include systemd due to their constrained resource limit. Our requirement from libsystemd is only event loop (sd-event). Therefore, libuv is perfect as drop-in replacement of sd-event. I tested the changes on Raspberry Pi 5 with Buildroot (yes, I am working on it too) and a x86-64 laptop with Arch Linux. Both are working as intended. Interestingly, libuv makes flutter-elinux smoother on my laptop. I have no idea how to benchmark it, but it is a good sign for us. For now, I am assuming users are still relying on libsystemd. Therefore, libuv only be used if the target device has no systemd. If maintainer want to drop the systemd dependency, I suggest to deprecate it gracefully and plan to drop it later. Otherwise, it would be a breaking change. Signed-off-by: Athaariq Ardhiansyah <[email protected]>
Signed-off-by: Athaariq Ardhiansyah <[email protected]>
Thank you for sending this PR. I would like to confirm one thing regarding this PR. It's unclear whether we can contribute this software to flutter/engine, but do you agree to delegate all rights related to this PR to Sony? |
Yeah sure! As long as it keep open sourced :) |
Thank you. Please check the CI failure. |
|
Signed-off-by: Athaariq Ardhiansyah <[email protected]>
Sorry, the commit 13b9206 was removed because I forgot to exclude the |
I realized that clang-format is inconsistent between its versions. So, Arch Linux (clang v17) and Ubuntu Jammy (clang v14) will output different formatting result. For Arch Linux users, the clang14 package has no clang-format included. You need to compile the entire clang on your own until the downstream maintainer include it. Signed-off-by: Athaariq Ardhiansyah <[email protected]>
On some distributions with non-latest CMake, it will fail on configuration due to its incapability of substition from unset variable to an empty string. To fix this, we need to add double quotes between variables that will be tested by EQUAL, LESS, GREATER, and other related keywords. For better compatibility, use STREQUAL instead of EQUAL if possible. Signed-off-by: Athaariq Ardhiansyah <[email protected]>
I discovered a quirk on For the CMake, this is my mistake. I supposed to consider to use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
I'm still looking for a solution how to make .clang-format be universal. Because this problem also affects Debian users since they prefer to stay on most stable version.
Thank you. I'll wait for your comment about this.
It's going to be a new PR in the future. For now, you can safely merge the changes. |
Okay, thank you so much. |
This PR solves:
For further commit description regarding libuv support, see 7928671.