Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for zig cc as C compiler. #13757

Merged
merged 1 commit into from
Apr 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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