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

meson: Sort input file list #3550

Merged
merged 1 commit into from Oct 11, 2023
Merged

meson: Sort input file list #3550

merged 1 commit into from Oct 11, 2023

Conversation

bmwiedemann
Copy link
Contributor

Describe your PR, what does it fix/add?

Sort cpp input file list
so that hyprland builds in a reproducible way
in spite of non-deterministic filesystem readdir order.

See https://reproducible-builds.org/ for why this is good.

This patch was done while working on reproducible builds for openSUSE.

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

requires a POSIX shell. It should be possible to replace the find with a python script, but I did not find a builtin sort function in meson.

Is it ready for merging, or does it need work?

I tested that it builds, so it should still work the same as before.

so that hyprland builds in a reproducible way
in spite of non-deterministic filesystem readdir order.

See https://reproducible-builds.org/ for why this is good.
This patch was done while working on reproducible builds for openSUSE.
@vaxerski
Copy link
Member

how does the order of the files change anything?

@vaxerski vaxerski requested a review from fufexan October 11, 2023 17:48
@bmwiedemann
Copy link
Contributor Author

bmwiedemann commented Oct 11, 2023

It influences the link order of .o files into the hyprland binary, which makes a difference to how functions are laid out and optimizations are applied in the machine code.

https://rb.zq1.de/compare.factory-20230830/diffs/hyprland-compare.out has a diff

Copy link
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spin.mp4

@vaxerski vaxerski merged commit 5dc7161 into hyprwm:main Oct 11, 2023
11 checks passed
@bmwiedemann bmwiedemann deleted the sort branch January 12, 2024 16:47
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