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

Made has_function survive optimization flags. Closes #1053. #1066

Merged
merged 1 commit into from Nov 20, 2016

Conversation

jpakkane
Copy link
Member

No description provided.

@nirbheek
Copy link
Member

I'm fairly certain we should fix this by changing the order in which we add the -O0 to CFLAGS.

@jpakkane
Copy link
Member Author

The tests themselves need to be robust against any combination of optimization flags. Otherwise this will keep breaking in subtly different ways over and over again.

@nirbheek
Copy link
Member

On the contrary, trying to fix tests by trying to be smarter than a compiler is an arms-race against compiler developers that we cannot win. Meson will magically/mysteriously keep breaking with newer versions of compilers, or with different compilers.

The sane way out is to force the compiler to not do any optimization at all, which is what we try right now but we pass the flags in the wrong order so it gets overriden.

@jpakkane
Copy link
Member Author

We should do both, because defense in depth is the only way to go.

@nirbheek
Copy link
Member

Fair enough! I'll be back tomorrow, and will make a PR for that + unit tests.

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.

None yet

2 participants