Skip to content

Commit

Permalink
Add support for zig cc as C compiler.
Browse files Browse the repository at this point in the history
  • Loading branch information
hessammehr committed Mar 25, 2020
1 parent 46c827b commit ca84f7c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions compiler/extccomp.nim
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,16 @@ compiler clang:
result.compilerExe = "clang"
result.cppCompiler = "clang++"

# Zig cc (Clang) C/C++ Compiler
compiler zig:
result = clang() # Uses settings from llvmGcc

result.name = "zig"
result.compilerExe = "zig"
result.cppCompiler = "zig"
result.compileTmpl = "cc " + result.compileTmpl
result.linkTmpl = "cc " + result.linkTmpl

# Microsoft Visual C/C++ Compiler
compiler vcc:
result = (
Expand Down Expand Up @@ -375,6 +385,7 @@ const
nintendoSwitchGCC(),
llvmGcc(),
clang(),
zig(),
lcc(),
bcc(),
dmc(),
Expand Down
2 changes: 1 addition & 1 deletion compiler/options.nim
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ type
disabledSf, writeOnlySf, readOnlySf, v2Sf

TSystemCC* = enum
ccNone, ccGcc, ccNintendoSwitch, ccLLVM_Gcc, ccCLang, ccLcc, ccBcc, ccDmc, ccWcc, ccVcc,
ccNone, ccGcc, ccNintendoSwitch, ccLLVM_Gcc, ccCLang, ccZig, ccLcc, ccBcc, ccDmc, ccWcc, ccVcc,
ccTcc, ccPcc, ccUcc, ccIcl, ccIcc, ccClangCl

ExceptionSystem* = enum
Expand Down

0 comments on commit ca84f7c

Please sign in to comment.