mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 01:14:41 +00:00
Add support for clang-cl (#9977)
This commit is contained in:
committed by
Andreas Rumpf
parent
2d404a5a24
commit
642ce799ec
@@ -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"
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user