Cfile = object nimname*: string cname*, obj*: AbsoluteFile flags*: set[CfileFlag] customArgs*: string
CfileFlag {.pure.} = enum
Cached, ## no need to recompile this time
External ## file was introduced via .compile pragmaCommand = enum cmdNone, cmdUnknown, cmdCompileToC, cmdCompileToCpp, cmdCompileToOC, cmdCompileToJS, cmdCrun, cmdTcc, cmdCheck, cmdM, cmdParse, cmdRod, cmdIdeTools, cmdNimscript, cmdDoc0, cmdDoc, cmdDoc2tex, cmdRst2html, cmdRst2tex, cmdMd2html, cmdMd2tex, cmdJsondoc0, cmdJsondoc, cmdCtags, cmdBuildindex, cmdGendepend, cmdDump, cmdInteractive, cmdNop, cmdJsonscript
ConfigRef {.acyclic.} = ref object
backend*: TBackend
target*: Target
linesCompiled*: int
options*: TOptions
globalOptions*: TGlobalOptions
macrosToExpand*: StringTableRef
arcToExpand*: StringTableRef
m*: MsgConfig
filenameOption*: FilenameOption
unitSep*: string
evalTemplateCounter*: int
evalMacroCounter*: int
exitcode*: int8
cmd*: Command
cmdInput*: string
projectIsCmd*: bool
implicitCmd*: bool
selectedGC*: TGCMode
exc*: ExceptionSystem
hintProcessingDots*: bool
verbosity*: int
numberOfProcessors*: int
lastCmdTime*: float
symbolFiles*: SymbolFilesOption
spellSuggestMax*: int
cppDefines*: HashSet[string]
headerFile*: string
nimbasePattern*: string
features*: set[Feature]
legacyFeatures*: set[LegacyFeature]
arguments*: string ## the arguments to be passed to the program that
## should be run
ideCmd*: IdeCmd
cCompiler*: TSystemCC
modifiedyNotes*: TNoteKinds
cmdlineNotes*: TNoteKinds
foreignPackageNotes*: TNoteKinds
notes*: TNoteKinds
warningAsErrors*: TNoteKinds
mainPackageNotes*: TNoteKinds
mainPackageId*: int
errorCounter*: int
hintCounter*: int
warnCounter*: int
errorMax*: int
maxLoopIterationsVM*: int ## VM: max iterations of all loops
isVmTrace*: bool
configVars*: StringTableRef
symbols*: StringTableRef ## We need to use a StringTableRef here as defined
## symbols are always guaranteed to be style
## insensitive. Otherwise hell would break lose.
packageCache*: StringTableRef
nimblePaths*: seq[AbsoluteDir]
searchPaths*: seq[AbsoluteDir]
lazyPaths*: seq[AbsoluteDir]
outFile*: RelativeFile
outDir*: AbsoluteDir
jsonBuildFile*: AbsoluteFile
prefixDir*, libpath*, nimcacheDir*: AbsoluteDir
dllOverrides*, moduleOverrides*, cfileSpecificOptions*: StringTableRef
projectName*: string
projectPath*: AbsoluteDir
projectFull*: AbsoluteFile
projectIsStdin*: bool
lastMsgWasDot*: set[StdOrrKind]
projectMainIdx*: FileIndex
projectMainIdx2*: FileIndex
command*: string
commandArgs*: seq[string]
commandLine*: string
extraCmds*: seq[string]
implicitImports*: seq[string]
implicitIncludes*: seq[string]
docSeeSrcUrl*: string
docRoot*: string ## see nim --fullhelp for --docRoot
docCmd*: string ## see nim --fullhelp for --docCmd
configFiles*: seq[AbsoluteFile]
cIncludes*: seq[AbsoluteDir]
cLibs*: seq[AbsoluteDir]
cLinkedLibs*: seq[string]
externalToLink*: seq[string]
linkOptionsCmd*: string
compileOptionsCmd*: seq[string]
linkOptions*: string
compileOptions*: string
cCompilerPath*: string
toCompile*: CfileList
suggestionResultHook*: proc (result: Suggest) {.closure.}
suggestVersion*: int
suggestMaxResults*: int
lastLineInfo*: TLineInfo
writelnHook*: proc (output: string) {.closure, ...gcsafe.}
structuredErrorHook*: proc (config: ConfigRef; info: TLineInfo; msg: string;
severity: Severity) {.closure, ...gcsafe.}
cppCustomNamespace*: string
nimMainPrefix*: string
vmProfileData*: ProfileData
expandProgress*: bool
expandLevels*: int
expandNodeResult*: string
expandPosition*: TLineInfo
currentConfigDir*: string
clientProcessId*: intFeature = enum
dotOperators, callOperator, parallel, destructor, notnil, dynamicBindSym,
forLoopMacros, caseStmtMacros, codeReordering, compiletimeFFI, ## This requires building nim with `-d:nimHasLibFFI`
## which itself requires `koch installdeps libffi`, see #10150
## Note: this feature can't be localized with {.push.}
vmopsDanger, strictFuncs, views, strictNotNil, overloadableEnums,
strictEffects, unicodeOperators, flexibleOptionalParams, strictDefs,
strictCaseObjects, inferGenericTypes, openSym, genericsOpenSym, vtablesFilenameOption = enum foAbs, foRelProject, foCanonical, foLegacyRelProj, foName, foStacktrace
IdeCmd = enum ideNone, ideSug, ideCon, ideDef, ideUse, ideDus, ideChk, ideChkFile, ideMod, ideHighlight, ideOutline, ideKnown, ideMsg, ideProject, ideGlobalSymbols, ideRecompile, ideChanged, ideType, ideDeclaration, ideExpand, ideInlayHints
LegacyFeature = enum
allowSemcheckedAstModification, ## Allows to modify a NimNode where the type has already been
## flagged with nfSem. If you actually do this, it will cause
## bugs.
checkUnsignedConversions, ## Historically and especially in version 1.0.0 of the language
## conversions to unsigned numbers were checked. In 1.0.4 they
## are not anymore.
laxEffects, ## Lax effects system prior to Nim 2.0.
verboseTypeMismatch, emitGenerics, ## generics are emitted in the module that contains them.
## Useful for libraries that rely on local passC
jsNoLambdaLifting ## Old transformation for closures in JS backendSuggest = ref object section*: IdeCmd qualifiedPath*: seq[string] name*: ptr string filePath*: string line*: int column*: int doc*: string forth*: string quality*: range[0 .. 100] = 0 isGlobal*: bool contextFits*: bool prefix*: PrefixMatch symkind*: byte scope*, localUsages*, globalUsages*: int tokenLen*: int version*: int endLine*: uint16 endCol*: int inlayHintInfo*: SuggestInlayHint
SuggestInlayHint = ref object kind*: SuggestInlayHintKind line*: int column*: int label*: string paddingLeft*: bool paddingRight*: bool allowInsert*: bool tooltip*: string
SuggestInlayHintKind = enum sihkType = "Type", sihkParameter = "Parameter", sihkException = "Exception"
TBackend = enum backendInvalid = "", backendC = "c", backendCpp = "cpp", backendJs = "js", backendObjc = "objc"
TGCMode = enum gcUnselected = "unselected", gcNone = "none", gcBoehm = "boehm", gcRegions = "regions", gcArc = "arc", gcOrc = "orc", gcAtomicArc = "atomicArc", gcMarkAndSweep = "markAndSweep", gcHooks = "hooks", gcRefc = "refc", gcGo = "go"
TGlobalOption = enum gloptNone, optForceFullMake, optWasNimscript, optListCmd, optCompileOnly, optNoLinking, optCDebug, optGenDynLib, optGenStaticLib, optGenGuiApp, optGenScript, optGenCDeps, optGenMapping, optRun, optUseNimcache, optStyleHint, optStyleError, optStyleUsages, optSkipSystemConfigFile, optSkipProjConfigFile, optSkipUserConfigFile, optSkipParentConfigFiles, optNoMain, optUseColors, optThreads, optStdout, optThreadAnalysis, optTlsEmulation, optGenIndex, optGenIndexOnly, optNoImportdoc, optEmbedOrigSrc, optIdeDebug, optIdeTerse, optIdeExceptionInlayHints, optExcessiveStackTrace, optShowAllMismatches, optWholeProject, optDocInternal, optMixedMode, optDeclaredLocs, optNoNimblePath, optHotCodeReloading, optDynlibOverrideAll, optSeqDestructors, optTinyRtti, optOwnedRefs, optMultiMethods, optBenchmarkVM, optProduceAsm, optPanics, optSourcemap, optProfileVM, optEnableDeepCopy, optShowNonExportedFields, optJsBigInt64
TOption = enum optNone, optObjCheck, optFieldCheck, optRangeCheck, optBoundsCheck, optOverflowCheck, optRefCheck, optNaNCheck, optInfCheck, optStaticBoundsCheck, optStyleCheck, optAssert, optLineDir, optWarns, optHints, optOptimizeSpeed, optOptimizeSize, optStackTrace, optStackTraceMsgs, optLineTrace, optByRef, optProfiler, optImplicitStatic, optTrMacros, optMemTracker, optSinkInference, optCursorInference, optImportHidden, optQuirky
ChecksOptions = {optObjCheck, optFieldCheck, optRangeCheck, optOverflowCheck,
optBoundsCheck, optAssert, optNaNCheck, optInfCheck,
optStyleCheck}cmdDocLike = {cmdDoc0, cmdDoc, cmdDoc2tex, cmdJsondoc0, cmdJsondoc, cmdCtags,
cmdBuildindex}DefaultOptions = {optObjCheck, optFieldCheck, optRangeCheck, optBoundsCheck,
optOverflowCheck, optAssert, optWarns, optRefCheck, optHints,
optStackTrace, optLineTrace, optTrMacros, optStyleCheck,
optCursorInference}foreignPackageNotesDefault = {hintProcessing, warnUnknownMagic, hintQuitCalled,
hintExecuting, hintUser, warnUser}proc completeGeneratedFilePath(conf: ConfigRef; f: AbsoluteFile;
createSubDir: bool = true): AbsoluteFile {.
...raises: [OSError, IOError],
tags: [ReadEnvEffect, ReadIOEffect, WriteDirEffect, ReadDirEffect],
forbids: [].}createSubDir is true. Source Edit proc getPrefixDir(conf: ConfigRef): AbsoluteDir {....raises: [],
tags: [ReadIOEffect], forbids: [].}Gets the prefix dir, usually the parent directory where the binary resides.
This is overridden by some tools (namely nimsuggest) via the conf.prefixDir field. This should resolve to root of nim sources, whether running nim from a local clone or using installed nim, so that these exist: result/doc/advopt.txt and result/lib/system.nim
© 2006–2024 Andreas Rumpf
Licensed under the MIT License.
https://nim-lang.org/docs/compiler/options.html