[Build Reproducibility] Sort input file list (#35687)

Sort input file list
so that the `.so` file builds in a reproducible way
in spite of non-deterministic filesystem readdir order and
http://bugs.python.org/issue30461

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

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




<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->

---------

Co-authored-by: Richard Belleville <rbellevi@google.com>
This commit is contained in:
Bernhard M. Wiedemann 2024-02-29 02:05:07 +01:00 committed by GitHub
parent 9b424b5dd4
commit d379dc24c5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -361,7 +361,8 @@ if BUILD_WITH_SYSTEM_RE2:
EXTENSION_LIBRARIES += ("re2",)
if BUILD_WITH_SYSTEM_ABSL:
EXTENSION_LIBRARIES += tuple(
lib.stem[3:] for lib in pathlib.Path("/usr").glob("lib*/libabsl_*.so")
lib.stem[3:]
for lib in sorted(pathlib.Path("/usr").glob("lib*/libabsl_*.so"))
)
DEFINE_MACROS = (("_WIN32_WINNT", 0x600),)