summaryrefslogtreecommitdiffstats
path: root/tools/windows.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/windows.py')
-rw-r--r--tools/windows.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/windows.py b/tools/windows.py
index b471aa0..62bc77d 100644
--- a/tools/windows.py
+++ b/tools/windows.py
@@ -8,6 +8,7 @@ from SCons.Variables import *
def options(opts):
opts.Add(BoolVariable("use_mingw", "Use the MinGW compiler instead of MSVC - only effective on Windows", False))
+ opts.Add(BoolVariable("use_clang_cl", "Use the clang driver instead of MSVC - only effective on Windows", False))
def exists(env):
@@ -29,6 +30,9 @@ def generate(env):
env.Append(CCFLAGS=["/Z7", "/Od", "/EHsc", "/D_DEBUG", "/MDd"])
elif env["target"] == "release":
env.Append(CCFLAGS=["/O2", "/EHsc", "/DNDEBUG", "/MD"])
+ if env["use_clang_cl"]:
+ env["CC"] = "clang-cl"
+ env["CXX"] = "clang-cl"
elif sys.platform == "win32" or sys.platform == "msys":
env["use_mingw"] = True