-
Notifications
You must be signed in to change notification settings - Fork 60
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
CMake: Compile with -ftrivial-auto-var-init=zero #139
Conversation
e45342c
to
59ff36d
Compare
Thank you. Rebased your change on top of master and started testing progress. |
Build step failing with
Some missing dependency? cc @Biswa96 |
I suspect something else.
If I then replace the following
the build runs through. I can't judge if Tested on openSUSE Leap 15.5 |
something like this (untested):
It would still have to be found out from which clang version |
I have created a setup that hopefully works everywhere: master...munix9:android-tools:trivial-auto-var-init3 I think it should work. |
59ff36d
to
6b3d9ff
Compare
Could you please also mention in the code why we check for the compiler flags this way? I would much prefer to drop the ugly if-else flag checking once the old version clang support is dropped (~2 years from now). |
As per upstream guidance [0] we should compile the sources with this flag in order to not hit issues with using uninitialized variables. [0] https://android-review.googlesource.com/c/platform/system/core/+/2963911/1#message-01ebff378bb51f7815b6ed8b035a57fbce0418ab Fixes nmeum#133 Co-authored-by: munix9 <[email protected]>
6b3d9ff
to
9d7a194
Compare
@anatol Like this? |
Looks good. @Biswa96 let me know if you have any objections. If not then I'll merge the change. |
As per upstream guidance [0] we should compile the sources with this flag in order to not hit issues with using uninitialized variables.
[0] https://android-review.googlesource.com/c/platform/system/core/+/2963911/1#message-01ebff378bb51f7815b6ed8b035a57fbce0418ab
Fixes #133