Skip to content

[compiler-rt][test] Use packaging.version.Version to compare glibc versions #142596

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions compiler-rt/test/lit.common.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -713,9 +713,9 @@ def add_glibc_versions(ver_string):
if config.android:
return

from distutils.version import LooseVersion
from packaging.version import Version

ver = LooseVersion(ver_string)
ver = Version(ver_string)
any_glibc = False
for required in [
"2.19",
Expand All @@ -727,7 +727,7 @@ def add_glibc_versions(ver_string):
"2.38",
"2.40",
]:
if ver >= LooseVersion(required):
if ver >= Version(required):
config.available_features.add("glibc-" + required)
any_glibc = True
if any_glibc:
Expand Down
Loading