summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-02-19 14:14:51 +0100
committerGitHub <noreply@github.com>2019-02-19 14:14:51 +0100
commitb7c50d99af9f6c18b8d8324ed9d215ee9b01e200 (patch)
treea2750e238aaa8de1601d27e51451d2c5ab215f23
parentc7ba1e210e4148dbb2ab5cb3322a0fc9c4dce2d7 (diff)
parent0c5f87531d28dfa51afe31ba3ad936908bdc1589 (diff)
Merge pull request #26052 from marcelofg55/mingw_cfix_win
Fix compiling with use_mingw flag on Windows
-rw-r--r--platform/uwp/detect.py1
-rw-r--r--platform/windows/detect.py4
2 files changed, 2 insertions, 3 deletions
diff --git a/platform/uwp/detect.py b/platform/uwp/detect.py
index f25b9ba9cd..c32a11b396 100644
--- a/platform/uwp/detect.py
+++ b/platform/uwp/detect.py
@@ -29,7 +29,6 @@ def get_opts():
return [
('msvc_version', 'MSVC version to use (ignored if the VCINSTALLDIR environment variable is set)', None),
- BoolVariable('use_mingw', 'Use the MinGW compiler even if MSVC is installed (only used on Windows)', False),
]
diff --git a/platform/windows/detect.py b/platform/windows/detect.py
index 0662bc2edc..9b07a7d469 100644
--- a/platform/windows/detect.py
+++ b/platform/windows/detect.py
@@ -347,12 +347,12 @@ def configure(env):
env['ENV']['TMP'] = os.environ['TMP']
# First figure out which compiler, version, and target arch we're using
- if os.getenv("VCINSTALLDIR"):
+ if os.getenv("VCINSTALLDIR") and not env["use_mingw"]:
# Manual setup of MSVC
setup_msvc_manual(env)
env.msvc = True
manual_msvc_config = True
- elif env.get('MSVC_VERSION', ''):
+ elif env.get('MSVC_VERSION', '') and not env["use_mingw"]:
setup_msvc_auto(env)
env.msvc = True
manual_msvc_config = False