Commits

mattip committed bc44c98

disallow asmgcc on win32, breaks untested mingw support

Comments (0)

Files changed (2)

rpython/config/test/test_translationoption.py

 from rpython.config.translationoption import get_combined_translation_config
 from rpython.config.translationoption import set_opt_level
 from rpython.config.config import ConflictConfigError
+from rpython.translator.platform import platform as compiler
 
 
 def test_no_gcrootfinder_with_boehm():
     config = get_combined_translation_config()
     config.translation.gcrootfinder = "shadowstack"
     py.test.raises(ConflictConfigError, set_opt_level, config, '0')
+
+if compiler.name == 'msvc':
+    def test_no_asmgcrot_on_msvc():
+        config = get_combined_translation_config()
+        config.translation.setoption('gcrootfinder', 'asmgcc', 'required') 
+        py.test.raises(ConflictConfigError, set_opt_level, config, 'jit')

rpython/config/translationoption.py

 import sys
 import os
 from rpython.config.config import OptionDescription, BoolOption, IntOption, ArbitraryOption, FloatOption
-from rpython.config.config import ChoiceOption, StrOption, Config
+from rpython.config.config import ChoiceOption, StrOption, Config, ConflictConfigError
 from rpython.config.config import ConfigError
 from rpython.config.support import detect_number_of_processors
 
     # if we have specified strange inconsistent settings.
     config.translation.gc = config.translation.gc
 
-    # disallow asmgcc on OS/X
+    # disallow asmgcc on OS/X and windows
     if config.translation.gcrootfinder == "asmgcc":
         assert sys.platform != "darwin"
+        if (sys.platform == 'win32'):
+            raise ConflictConfigError("asmgcc unusable on win32")
 
 # ----------------------------------------------------------------