]> granicus.if.org Git - graphviz/commitdiff
gvtest.py: correct compiler used on MinGW
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Tue, 4 Jan 2022 09:37:12 +0000 (10:37 +0100)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Mon, 10 Jan 2022 08:35:27 +0000 (09:35 +0100)
rtest/gvtest.py

index 88a0561c6e938c146f4cdde513f67ebe209dd628..c6c699258a34de02575134142a0544d2ee1c7e08 100644 (file)
@@ -4,6 +4,7 @@ import os
 from pathlib import Path
 import platform
 import subprocess
+import sysconfig
 import tempfile
 from typing import List, Optional, Tuple, Union
 
@@ -27,7 +28,7 @@ def compile_c(src: Path, cflags: List[str] = None, link: List[str] = None,
   if dst is None:
     _, dst = tempfile.mkstemp(".exe")
 
-  if platform.system() == "Windows":
+  if platform.system() == "Windows" and "mingw" not in sysconfig.get_platform():
     # determine which runtime library option we need
     rtflag = "-MDd" if os.environ.get("configuration") == "Debug" else "-MD"