extccomp

Types

TInfoCCProp = enum
  hasSwitchRange, hasComputedGoto, hasCpp, hasAssume, hasGcGuard, hasGnuAsm,
  hasDeclspec, hasAttribute
  Source Edit
TInfoCCProps = set[TInfoCCProp]
  Source Edit
TInfoCC = tuple[name: string, objExt: string, optSpeed: string, optSize: string,
                compilerExe: string, cppCompiler: string, compileTmpl: string,
                buildGui: string, buildDll: string, buildLib: string,
                linkerExe: string, linkTmpl: string, includeCmd: string,
                linkDirCmd: string, linkLibCmd: string, debug: string,
                pic: string, asmStmtFrmt: string, structStmtFmt: string,
                produceAsm: string, cppXsupport: string, props: TInfoCCProps]
  Source Edit

Consts

CC: array[succ(low(TSystemCC)) .. high(TSystemCC), TInfoCC] = [("gcc", "o",
    " -O3 -fno-ident", " -Os -fno-ident", "gcc", "g++",
    "-c $options $include -o $objfile $file", " -mwindows", " -shared",
    "ar rcs $libfile $objfiles", "",
    "$buildgui $builddll -o $exefile $objfiles $options", " -I", " -L", " -l$1",
    "", "-fPIC", "asm($1);$n", "$1 $3 $2 ",
    "-Wa,-acdl=$asmfile -g -fverbose-asm -masm=intel",
    "-std=gnu++14 -funsigned-char", {hasSwitchRange, hasComputedGoto, hasCpp,
                                     hasGcGuard, hasGnuAsm, hasAttribute}), (
    "switch_gcc", "o", " -O3 ", " -Os ", "aarch64-none-elf-gcc",
    "aarch64-none-elf-g++",
    "-w -MMD -MP -MF $dfile -c $options $include -o $objfile $file",
    " -mwindows", " -shared", "aarch64-none-elf-gcc-ar rcs $libfile $objfiles",
    "aarch64-none-elf-gcc",
    "$buildgui $builddll -Wl,-Map,$mapfile -o $exefile $objfiles $options",
    " -I", " -L", " -l$1", "", "-fPIE", "asm($1);$n", "$1 $3 $2 ",
    "-Wa,-acdl=$asmfile -g -fverbose-asm -masm=intel",
    "-std=gnu++14 -funsigned-char", {hasSwitchRange, hasComputedGoto, hasCpp,
                                     hasGcGuard, hasGnuAsm, hasAttribute}), (
    "llvm_gcc", "o", " -O3 -fno-ident", " -Os -fno-ident", "llvm-gcc",
    "llvm-g++", "-c $options $include -o $objfile $file", " -mwindows",
    " -shared", "llvm-ar rcs $libfile $objfiles", "",
    "$buildgui $builddll -o $exefile $objfiles $options", " -I", " -L", " -l$1",
    "", "-fPIC", "asm($1);$n", "$1 $3 $2 ",
    "-Wa,-acdl=$asmfile -g -fverbose-asm -masm=intel",
    "-std=gnu++14 -funsigned-char", {hasSwitchRange, hasComputedGoto, hasCpp,
                                     hasGcGuard, hasGnuAsm, hasAttribute}), (
    "clang", "o", " -O3 -fno-ident", " -Os -fno-ident", "clang", "clang++",
    "-c $options $include -o $objfile $file", " -mwindows", " -shared",
    "llvm-ar rcs $libfile $objfiles", "",
    "$buildgui $builddll -o $exefile $objfiles $options", " -I", " -L", " -l$1",
    "", "-fPIC", "asm($1);$n", "$1 $3 $2 ",
    "-Wa,-acdl=$asmfile -g -fverbose-asm -masm=intel",
    "-std=gnu++14 -funsigned-char", {hasSwitchRange, hasComputedGoto, hasCpp,
                                     hasGcGuard, hasGnuAsm, hasAttribute}), (
    "bcc", "obj", " -O3 -6 ", " -O1 -6 ", "bcc32c", "cpp32c",
    "-c $options $include -o$objfile $file", " -tW", " -tWD", "", "bcc32",
    "$options $buildgui $builddll -e$exefile $objfiles", " -I", "", "", "", "",
    "__asm{$n$1$n}$n", "$1 $2", "", "",
    {hasSwitchRange, hasComputedGoto, hasCpp, hasGcGuard, hasAttribute}), (
    "vcc", "obj", " /Ogityb2 ", " /O1 ", "cl", "cl",
    "/c$vccplatform $options $include /nologo /Fo$objfile $file",
    " /SUBSYSTEM:WINDOWS user32.lib ", " /LD", "lib /OUT:$libfile $objfiles",
    "cl",
    "$builddll$vccplatform /Fe$exefile $objfiles $buildgui /nologo $options",
    " /I", " /LIBPATH:", " $1.lib", " /RTC1 /Z7 ", "", "__asm{$n$1$n}$n",
    "$3$n$1 $2", "/Fa$asmfile", "", {hasCpp, hasAssume, hasDeclspec}), ("tcc",
    "o", "", "", "tcc", "", "-c $options $include -o $objfile $file",
    "-Wl,-subsystem=gui", " -shared", "", "tcc",
    "-o $exefile $options $buildgui $builddll $objfiles", " -I", "", "", " -g ",
    "", "asm($1);$n", "$1 $2",
    "-Wa,-acdl=$asmfile -g -fverbose-asm -masm=intel", "",
    {hasSwitchRange, hasComputedGoto, hasGnuAsm}), ("env", "o", " -O3 ",
    " -O1 ", "", "", "-c $ccenvflags $options $include -o $objfile $file", "",
    " -shared ", "", "cc", "-o $exefile $buildgui $builddll $objfiles $options",
    " -I", "", "", "", "", "__asm{$n$1$n}$n", "$1 $2", "", "", {hasGnuAsm}), (
    "icl", "obj", " /Ogityb2 ", " /O1 ", "icl", "cl",
    "/c$vccplatform $options $include /nologo /Fo$objfile $file",
    " /SUBSYSTEM:WINDOWS user32.lib ", " /LD", "lib /OUT:$libfile $objfiles",
    "icl",
    "$builddll$vccplatform /Fe$exefile $objfiles $buildgui /nologo $options",
    " /I", " /LIBPATH:", " $1.lib", " /RTC1 /Z7 ", "", "__asm{$n$1$n}$n",
    "$3$n$1 $2", "/Fa$asmfile", "", {hasCpp, hasAssume, hasDeclspec}), ("icc",
    "o", " -O3 -fno-ident", " -Os -fno-ident", "icc", "g++",
    "-c $options $include -o $objfile $file", " -mwindows", " -shared",
    "ar rcs $libfile $objfiles", "icc",
    "$buildgui $builddll -o $exefile $objfiles $options", " -I", " -L", " -l$1",
    "", "-fPIC", "asm($1);$n", "$1 $3 $2 ",
    "-Wa,-acdl=$asmfile -g -fverbose-asm -masm=intel",
    "-std=gnu++14 -funsigned-char", {hasSwitchRange, hasComputedGoto, hasCpp,
                                     hasGcGuard, hasGnuAsm, hasAttribute}), (
    "clang_cl", "obj", " /Ogityb2 ", " /O1 ", "clang-cl", "clang-cl",
    "/c$vccplatform $options $include /nologo /Fo$objfile $file",
    " /SUBSYSTEM:WINDOWS user32.lib ", " /LD", "lib /OUT:$libfile $objfiles",
    "clang-cl", "-fuse-ld=lld $builddll$vccplatform /Fe$exefile $objfiles $buildgui /nologo $options",
    " /I", " /LIBPATH:", " $1.lib", " /RTC1 /Z7 ", "", "__asm{$n$1$n}$n",
    "$3$n$1 $2", "/Fa$asmfile", "", {hasCpp, hasAssume, hasDeclspec})]
  Source Edit
hExt = ".h"
  Source Edit

Procs

proc nameToCC(name: string): TSystemCC {...}{.raises: [], tags: [].}
Returns the kind of compiler referred to by name, or ccNone if the name doesn't refer to any known compiler.   Source Edit
proc isVSCompatible(conf: ConfigRef): bool {...}{.raises: [], tags: [].}
  Source Edit
proc setCC(conf: ConfigRef; ccname: string; info: TLineInfo) {...}{.
    raises: [Exception, ValueError, IOError, ERecoverableError],
    tags: [RootEffect, WriteIOEffect, ReadIOEffect, ReadEnvEffect].}
  Source Edit
proc addLinkOption(conf: ConfigRef; option: string) {...}{.raises: [], tags: [].}
  Source Edit
proc addCompileOption(conf: ConfigRef; option: string) {...}{.raises: [], tags: [].}
  Source Edit
proc addLinkOptionCmd(conf: ConfigRef; option: string) {...}{.raises: [], tags: [].}
  Source Edit
proc addCompileOptionCmd(conf: ConfigRef; option: string) {...}{.raises: [], tags: [].}
  Source Edit
proc initVars(conf: ConfigRef) {...}{.raises: [], tags: [].}
  Source Edit
proc completeCfilePath(conf: ConfigRef; cfile: AbsoluteFile;
                       createSubDir: bool = true): AbsoluteFile {...}{.
    raises: [OSError, IOError], tags: [ReadEnvEffect, ReadIOEffect,
                                       WriteDirEffect, ReadDirEffect,
                                       WriteIOEffect].}
  Source Edit
proc toObjFile(conf: ConfigRef; filename: AbsoluteFile): AbsoluteFile {...}{.
    raises: [], tags: [].}
  Source Edit
proc addFileToCompile(conf: ConfigRef; cf: Cfile) {...}{.raises: [], tags: [].}
  Source Edit
proc addLocalCompileOption(conf: ConfigRef; option: string;
                           nimfile: AbsoluteFile) {...}{.
    raises: [OSError, IOError, KeyError, Exception], tags: [ReadEnvEffect,
    ReadIOEffect, WriteDirEffect, ReadDirEffect, WriteIOEffect, RootEffect].}
  Source Edit
proc resetCompilationLists(conf: ConfigRef) {...}{.raises: [], tags: [].}
  Source Edit
proc addExternalFileToLink(conf: ConfigRef; filename: AbsoluteFile) {...}{.
    raises: [], tags: [].}
  Source Edit
proc execExternalProgram(conf: ConfigRef; cmd: string; msg = hintExecuting) {...}{.
    raises: [Exception, ValueError, IOError, ERecoverableError], tags: [
    RootEffect, WriteIOEffect, ReadIOEffect, ReadEnvEffect, ExecIOEffect].}
  Source Edit
proc ccHasSaneOverflow(conf: ConfigRef): bool {...}{.raises: [],
    tags: [ExecIOEffect, ReadIOEffect, RootEffect].}
  Source Edit
proc getCompileCFileCmd(conf: ConfigRef; cfile: Cfile; isMainFile = false;
                        produceOutput = false): string {...}{.
    raises: [Exception, ValueError, IOError, ERecoverableError, OSError], tags: [
    ReadEnvEffect, RootEffect, WriteIOEffect, ReadIOEffect, WriteDirEffect,
    ReadDirEffect].}
  Source Edit
proc addExternalFileToCompile(conf: ConfigRef; c: var Cfile) {...}{.raises: [OSError,
    KeyError, Exception, IOError, ValueError, ERecoverableError, EOFError], tags: [
    ReadEnvEffect, ReadIOEffect, ReadDirEffect, RootEffect, WriteIOEffect,
    WriteDirEffect].}
  Source Edit
proc addExternalFileToCompile(conf: ConfigRef; filename: AbsoluteFile) {...}{.raises: [
    OSError, IOError, KeyError, Exception, ValueError, ERecoverableError,
    EOFError], tags: [ReadEnvEffect, ReadIOEffect, WriteDirEffect,
                      ReadDirEffect, WriteIOEffect, RootEffect].}
  Source Edit
proc callCCompiler(conf: ConfigRef) {...}{.raises: [Exception, ValueError, IOError,
    ERecoverableError, OSError], tags: [ReadEnvEffect, RootEffect,
                                        WriteIOEffect, ReadIOEffect,
                                        WriteDirEffect, ReadDirEffect,
                                        ExecIOEffect, TimeEffect].}
  Source Edit
proc writeJsonBuildInstructions(conf: ConfigRef) {...}{.
    raises: [OSError, IOError, Exception, ValueError, ERecoverableError], tags: [
    ReadEnvEffect, ReadIOEffect, ReadDirEffect, WriteIOEffect, RootEffect,
    WriteDirEffect, TimeEffect].}
  Source Edit
proc changeDetectedViaJsonBuildInstructions(conf: ConfigRef;
    projectfile: AbsoluteFile): bool {...}{.raises: [OSError, Exception], tags: [
    ReadEnvEffect, ReadIOEffect, ReadDirEffect, WriteIOEffect].}
  Source Edit
proc runJsonBuildInstructions(conf: ConfigRef; projectfile: AbsoluteFile) {...}{.
    raises: [OSError], tags: [ReadEnvEffect, ReadIOEffect, WriteIOEffect,
                              WriteDirEffect, ReadDirEffect, RootEffect,
                              ExecIOEffect, TimeEffect].}
  Source Edit
proc writeMapping(conf: ConfigRef; symbolMapping: Rope) {...}{.
    raises: [ValueError, OSError, IOError, Exception, ERecoverableError],
    tags: [WriteIOEffect, RootEffect, ReadIOEffect, ReadEnvEffect].}
  Source Edit