Skip to content
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

Don't strip all optimization flags. #169

Closed
wants to merge 1 commit into from

Conversation

sandsmark
Copy link

Some basic compiler functionality is dependendent on having
optimizations enabled.

There shouldn't be any issues with -O2, which is the default for qmake's
release builds.

Some basic compiler functionality is dependendent on having
optimizations enabled.

There shouldn't be any issues with -O2, which is the default for qmake's
release builds.
@sandsmark
Copy link
Author

appveyor seems to fail because it tries to push something to github but can't authenticate.

@EspoTek
Copy link
Owner

EspoTek commented Apr 3, 2021

Yep, AppVeyor requires my credentials. Don't worry too much about it.

Regarding the flag stripping, though, I remember those lines were added to solve (I think?) some weird hang during the Linux USB setup code about 4 years ago.
Not knowing what exactly those flags do, is there any reason why you think we should remove them?

@sandsmark
Copy link
Author

I don't remember exactly what, but some of the default compiler options used when packaging on archlinux (and some other distros) depend on some compiler analysis passes that are only done when optimization is turned on. So not the optimizations themselves, it just needs the information the compiler accumulates when optimizing. So it is necessary to package it on archlinux at least.

And without any optimizations at all things got slow on my laptop (and the CPU usage on my desktop machine went up a bit).

I have started on a branch that fixes some compiler warnings, I assume one/some of those might be the original underlying reason.

Though I have been using it on linux for a while now without problems (with optimizations).

@sandsmark
Copy link
Author

the commit is here as well, so closing this: #172

@sandsmark sandsmark closed this Apr 14, 2021
@mikhirev
Copy link

mikhirev commented May 6, 2021

Regarding the flag stripping, though, I remember those lines were added to solve (I think?) some weird hang during the Linux USB setup code about 4 years ago.

It means there is (or was) some bug in the code. It needs to be fixed, removing optimization flags is a wrong way to work around errors.

@EspoTek
Copy link
Owner

EspoTek commented May 7, 2021

Yes, I know that now. But it doesn't mean I should resurrect some undefined behaviour from 4 years ago just for the sheer intellectual joy of applying a "proper" fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants