Add support for clang-cl (#9977)

This commit is contained in:
Neelesh Chandola
2018-12-19 14:05:25 +05:30
committed by Andreas Rumpf
parent 2d404a5a24
commit 642ce799ec
3 changed files with 15 additions and 2 deletions

View File

@@ -153,6 +153,13 @@ compiler vcc:
structStmtFmt: "$3$n$1 $2",
props: {hasCpp, hasAssume, hasDeclspec})
compiler clangcl:
result = vcc()
result.name = "clang_cl"
result.compilerExe = "clang-cl"
result.cppCompiler = "clang-cl"
result.linkerExe = "clang-cl"
# Intel C/C++ Compiler
compiler icl:
result = vcc()
@@ -353,7 +360,8 @@ const
pcc(),
ucc(),
icl(),
icc()]
icc(),
clangcl()]
hExt* = ".h"

View File

@@ -132,7 +132,7 @@ type
TSystemCC* = enum
ccNone, ccGcc, ccNintendoSwitch, ccLLVM_Gcc, ccCLang, ccLcc, ccBcc, ccDmc, ccWcc, ccVcc,
ccTcc, ccPcc, ccUcc, ccIcl, ccIcc
ccTcc, ccPcc, ccUcc, ccIcl, ccIcc, ccClangCl
CfileFlag* {.pure.} = enum
Cached, ## no need to recompile this time

View File

@@ -226,6 +226,11 @@ clang.options.speed = "-O3"
clang.options.size = "-Os"
@if windows:
clang_cl.cpp.options.always %= "${clang_cl.options.always} /EHsc"
@if not release:
clang_cl.options.linker = "/Z7"
clang_cl.cpp.options.linker = "/Z7"
@end
clang.options.debug = "-g -gcodeview"
clang.cpp.options.debug = "-g -gcodeview"
@if not release: