[Git][ghc/ghc][master] testsuite: don't attempt to detect host cpu features when testing cross ghc

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Thu May 23 01:54:45 UTC 2024



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
c4c6d714 by Cheng Shao at 2024-05-22T21:54:06-04:00
testsuite: don't attempt to detect host cpu features when testing cross ghc

The testsuite driver CPU feature detection logic only detects host CPU
and only makes sense when we are not testing a cross GHC.

- - - - -


1 changed file:

- testsuite/driver/cpu_features.py


Changes:

=====================================
testsuite/driver/cpu_features.py
=====================================
@@ -17,6 +17,11 @@ SUPPORTED_CPU_FEATURES = {
 cpu_feature_cache = None
 
 def get_cpu_features():
+    # we're testing a cross ghc, don't attempt to detect host cpu
+    # configuration
+    if config.target_wrapper is not None:
+        return {}
+
     if config.os in ['mingw32', 'linux'] and os.path.exists('/proc/cpuinfo'):
         with open('/proc/cpuinfo') as x:
             f = x.read()



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/c4c6d714b93e65052c872df0c3b700302adaba97

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/c4c6d714b93e65052c872df0c3b700302adaba97
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240522/08fdd97e/attachment-0001.html>


More information about the ghc-commits mailing list