Skip to content
Snippets Groups Projects
Commit fecf92de authored by Cheng Shao's avatar Cheng Shao 🏖️
Browse files

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.

(cherry picked from commit c4c6d714)
(cherry picked from commit 07641012)
(cherry picked from commit 68bc5d72)
parent 67970fa1
No related branches found
No related tags found
No related merge requests found
...@@ -16,6 +16,11 @@ SUPPORTED_CPU_FEATURES = { ...@@ -16,6 +16,11 @@ SUPPORTED_CPU_FEATURES = {
cpu_feature_cache = None cpu_feature_cache = None
def get_cpu_features(): 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'): if config.os in ['mingw32', 'linux'] and os.path.exists('/proc/cpuinfo'):
f = open('/proc/cpuinfo').read() f = open('/proc/cpuinfo').read()
flags = re.search(r'flags\s*:\s*.*$', f, re.M) flags = re.search(r'flags\s*:\s*.*$', f, re.M)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment