Skip to content

Commit

Permalink
cleanup the CC setting, only leave in there what is at least semi-off…
Browse files Browse the repository at this point in the history
…icially supported
  • Loading branch information
Araq committed May 6, 2020
1 parent 330b3c4 commit 1b2b321
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 122 deletions.
120 changes: 0 additions & 120 deletions compiler/extccomp.nim
Original file line number Diff line number Diff line change
Expand Up @@ -138,16 +138,6 @@ 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 @@ -196,32 +186,6 @@ compiler icc:
result.compilerExe = "icc"
result.linkerExe = "icc"

# Local C Compiler
compiler lcc:
result = (
name: "lcc",
objExt: "obj",
optSpeed: " -O -p6 ",
optSize: " -O -p6 ",
compilerExe: "lcc",
cppCompiler: "",
compileTmpl: "$options $include -Fo$objfile $file",
buildGui: " -subsystem windows",
buildDll: " -dll",
buildLib: "", # XXX: not supported yet
linkerExe: "lcclnk",
linkTmpl: "$options $buildgui $builddll -O $exefile $objfiles",
includeCmd: " -I",
linkDirCmd: "", # XXX: not supported yet
linkLibCmd: "", # XXX: not supported yet
debug: " -g5 ",
pic: "",
asmStmtFrmt: "_asm{$n$1$n}$n",
structStmtFmt: "$1 $2",
produceAsm: "",
cppXsupport: "",
props: {})

# Borland C Compiler
compiler bcc:
result = (
Expand Down Expand Up @@ -249,58 +213,6 @@ compiler bcc:
props: {hasSwitchRange, hasComputedGoto, hasCpp, hasGcGuard,
hasAttribute})

# Digital Mars C Compiler
compiler dmc:
result = (
name: "dmc",
objExt: "obj",
optSpeed: " -ff -o -6 ",
optSize: " -ff -o -6 ",
compilerExe: "dmc",
cppCompiler: "",
compileTmpl: "-c $options $include -o$objfile $file",
buildGui: " -L/exet:nt/su:windows",
buildDll: " -WD",
buildLib: "", # XXX: not supported yet
linkerExe: "dmc",
linkTmpl: "$options $buildgui $builddll -o$exefile $objfiles",
includeCmd: " -I",
linkDirCmd: "", # XXX: not supported yet
linkLibCmd: "", # XXX: not supported yet
debug: " -g ",
pic: "",
asmStmtFrmt: "__asm{$n$1$n}$n",
structStmtFmt: "$3$n$1 $2",
produceAsm: "",
cppXsupport: "",
props: {hasCpp})

# Watcom C Compiler
compiler wcc:
result = (
name: "wcc",
objExt: "obj",
optSpeed: " -ox -on -6 -d0 -fp6 -zW ",
optSize: "",
compilerExe: "wcl386",
cppCompiler: "",
compileTmpl: "-c $options $include -fo=$objfile $file",
buildGui: " -bw",
buildDll: " -bd",
buildLib: "", # XXX: not supported yet
linkerExe: "wcl386",
linkTmpl: "$options $buildgui $builddll -fe=$exefile $objfiles ",
includeCmd: " -i=",
linkDirCmd: "", # XXX: not supported yet
linkLibCmd: "", # XXX: not supported yet
debug: " -d2 ",
pic: "",
asmStmtFrmt: "__asm{$n$1$n}$n",
structStmtFmt: "$1 $2",
produceAsm: "",
cppXsupport: "",
props: {hasCpp})

# Tiny C Compiler
compiler tcc:
result = (
Expand All @@ -327,33 +239,6 @@ compiler tcc:
cppXsupport: "",
props: {hasSwitchRange, hasComputedGoto, hasGnuAsm})

# Pelles C Compiler
compiler pcc:
# Pelles C
result = (
name: "pcc",
objExt: "obj",
optSpeed: " -Ox ",
optSize: " -Os ",
compilerExe: "cc",
cppCompiler: "",
compileTmpl: "-c $options $include -Fo$objfile $file",
buildGui: " -SUBSYSTEM:WINDOWS",
buildDll: " -DLL",
buildLib: "", # XXX: not supported yet
linkerExe: "cc",
linkTmpl: "$options $buildgui $builddll -OUT:$exefile $objfiles",
includeCmd: " -I",
linkDirCmd: "", # XXX: not supported yet
linkLibCmd: "", # XXX: not supported yet
debug: " -Zi ",
pic: "",
asmStmtFrmt: "__asm{$n$1$n}$n",
structStmtFmt: "$1 $2",
produceAsm: "",
cppXsupport: "",
props: {})

# Your C Compiler
compiler ucc:
result = (
Expand Down Expand Up @@ -386,14 +271,9 @@ const
nintendoSwitchGCC(),
llvmGcc(),
clang(),
zig(),
lcc(),
bcc(),
dmc(),
wcc(),
vcc(),
tcc(),
pcc(),
ucc(),
icl(),
icc(),
Expand Down
4 changes: 2 additions & 2 deletions compiler/options.nim
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ type
disabledSf, writeOnlySf, readOnlySf, v2Sf

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

ExceptionSystem* = enum
excNone, # no exception system selected yet
Expand Down

0 comments on commit 1b2b321

Please sign in to comment.