From: Magnus Jacobsson Date: Tue, 4 Jan 2022 09:37:12 +0000 (+0100) Subject: gvtest.py: correct compiler used on MinGW X-Git-Tag: 3.0.0~82^2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7d77bc5455306d7226b63d8547f690bd2caeff97;p=graphviz gvtest.py: correct compiler used on MinGW --- diff --git a/rtest/gvtest.py b/rtest/gvtest.py index 88a0561c6..c6c699258 100644 --- a/rtest/gvtest.py +++ b/rtest/gvtest.py @@ -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"