From d7b7b9cd6d12a8cbc35fba4ecfd0a557011e9cdd Mon Sep 17 00:00:00 2001 From: David Spickett Date: Fri, 12 Sep 2025 08:41:00 +0100 Subject: [PATCH] Revert "[compiler-rt][test] Use packaging.version.Version to compare glibc versions" (#158230) Reverts llvm/llvm-project#142596 Got reports that some tests previously skipped are running again and failing. --- compiler-rt/test/lit.common.cfg.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler-rt/test/lit.common.cfg.py b/compiler-rt/test/lit.common.cfg.py index 7734491310ed..e2e815444dcf 100644 --- a/compiler-rt/test/lit.common.cfg.py +++ b/compiler-rt/test/lit.common.cfg.py @@ -713,9 +713,9 @@ if config.target_os == "Linux": if config.android: return - from packaging.version import Version + from distutils.version import LooseVersion - ver = Version(ver_string) + ver = LooseVersion(ver_string) any_glibc = False for required in [ "2.19", @@ -727,7 +727,7 @@ if config.target_os == "Linux": "2.38", "2.40", ]: - if ver >= Version(required): + if ver >= LooseVersion(required): config.available_features.add("glibc-" + required) any_glibc = True if any_glibc: