[Git][ghc/ghc][wip/req_smp] Fix ghc vs host, fix ghc_with_smp leftover

Sylvain Henry (@hsyl20) gitlab at gitlab.haskell.org
Mon Jan 16 11:25:51 UTC 2023



Sylvain Henry pushed to branch wip/req_smp at Glasgow Haskell Compiler / GHC


Commits:
0872fa13 by Sylvain Henry at 2023-01-16T12:26:13+01:00
Fix ghc vs host, fix ghc_with_smp leftover

- - - - -


4 changed files:

- testsuite/config/ghc
- testsuite/driver/testglobals.py
- testsuite/driver/testlib.py
- testsuite/mk/test.mk


Changes:

=====================================
testsuite/config/ghc
=====================================
@@ -253,7 +253,7 @@ def get_compiler_info():
     # itself supports smp. To support smp the host must be linked with an RTS
     # built with 'defined(THREADED_RTS) && !defined(NO_SMP)'. Thus we directly
     # query the RTS the host is linked with.
-    config.host_has_smp = test_compile(["+RTS", "-N"])
+    config.ghc_has_smp    = test_compile(["+RTS", "-N"])
 
     config.have_vanilla   = compiler_supports_way([])
     config.have_dynamic   = compiler_supports_way(['-dynamic'])


=====================================
testsuite/driver/testglobals.py
=====================================
@@ -148,7 +148,7 @@ class TestConfig:
         self.ghc_dynamic = False
 
         # Does the host RTS have SMP support?
-        self.host_has_smp = True
+        self.ghc_has_smp = True
 
         # Does the target have SMP support?
         self.target_has_smp = True


=====================================
testsuite/driver/testlib.py
=====================================
@@ -298,11 +298,9 @@ def req_th( name, opts ):
 
 def req_ghc_smp( name, opts ):
     """
-    Mark a test as requiring the host to be linked with an RTS that supports
-    smp. Use this when the test needs to be compiled with smp support, but may
-    not necessarily be run.
+    Mark a test as requiring GHC to be linked with an RTS that supports smp.
     """
-    if not config.host_has_smp:
+    if not config.ghc_has_smp:
         opts.skip = True
 
 def req_target_smp( name, opts ):


=====================================
testsuite/mk/test.mk
=====================================
@@ -164,9 +164,9 @@ CABAL_PLUGIN_BUILD = --enable-library-vanilla --disable-shared
 endif
 
 ifeq "$(GhcWithSMP)" "YES"
-RUNTEST_OPTS += -e ghc_with_smp=True
+RUNTEST_OPTS += -e target_with_smp=True
 else
-RUNTEST_OPTS += -e ghc_with_smp=False
+RUNTEST_OPTS += -e target_with_smp=False
 endif
 
 ifeq "$(GhcWithRtsLinker)" "YES"



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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0872fa1310c4fa2ebe802e2d2f0c586b88fae78a
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/20230116/1c433519/attachment-0001.html>


More information about the ghc-commits mailing list