mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-08 14:03:23 +00:00
the mainmodule option has effect only when no explicit module is given
This commit is contained in:
@@ -231,8 +231,7 @@ proc processSwitch(switch, arg: string, pass: TCmdlinePass, info: TLineInfo) =
|
||||
options.outFile = arg
|
||||
of "mainmodule", "m":
|
||||
expectArg(switch, arg, pass, info)
|
||||
gProjectName = arg
|
||||
gProjectFull = gProjectPath / gProjectName
|
||||
optMainModule = arg
|
||||
of "define", "d":
|
||||
expectArg(switch, arg, pass, info)
|
||||
DefineSymbol(arg)
|
||||
|
||||
@@ -382,15 +382,14 @@ proc CommandSuggest =
|
||||
|
||||
proc wantMainModule =
|
||||
if gProjectFull.len == 0:
|
||||
Fatal(gCmdLineInfo, errCommandExpectsFilename)
|
||||
if optMainModule.len == 0:
|
||||
Fatal(gCmdLineInfo, errCommandExpectsFilename)
|
||||
else:
|
||||
gProjectName = optMainModule
|
||||
gProjectFull = gProjectPath / gProjectName
|
||||
|
||||
gProjectMainIdx = addFileExt(gProjectFull, nimExt).fileInfoIdx
|
||||
|
||||
var oss: PGenericSeq
|
||||
proc dbgseqimp(x: PGenericSeq) {.cdecl.} =
|
||||
oss = x
|
||||
|
||||
seqdbg = dbgseqimp
|
||||
|
||||
proc resetMemory =
|
||||
resetCompilationLists()
|
||||
ccgutils.resetCaches()
|
||||
|
||||
@@ -99,7 +99,7 @@ var
|
||||
gVerbosity*: int # how verbose the compiler is
|
||||
gNumberOfProcessors*: int # number of processors
|
||||
gWholeProject*: bool # for 'doc2': output any dependency
|
||||
gEvalExpr*: string # expression for idetools --eval
|
||||
gEvalExpr* = "" # expression for idetools --eval
|
||||
gLastCmdTime*: float # when caas is enabled, we measure each command
|
||||
gListFullPaths*: bool
|
||||
|
||||
@@ -124,6 +124,7 @@ var
|
||||
gProjectPath* = "" # holds a path like /home/alice/projects/nimrod/compiler/
|
||||
gProjectFull* = "" # projectPath/projectName
|
||||
gProjectMainIdx*: int32 # the canonical path id of the main module
|
||||
optMainModule* = "" # the main module that should be used for idetools commands
|
||||
nimcacheDir* = ""
|
||||
command* = "" # the main command (e.g. cc, check, scan, etc)
|
||||
commandArgs*: seq[string] = @[] # any arguments after the main command
|
||||
|
||||
@@ -81,7 +81,7 @@ const
|
||||
# examined in the decref loop in collectCycles.
|
||||
# XXX: not implemented yet as tests didn't show any improvement from this
|
||||
|
||||
MarkingSkipsAcyclicObjects = false
|
||||
MarkingSkipsAcyclicObjects = true
|
||||
# Acyclic objects can be safely ignored in the mark and scan phases,
|
||||
# because they cannot contribute to the internal count.
|
||||
# XXX: if we generate specialized `markCyclic` and `markAcyclic`
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
discard """
|
||||
file: "system.nim"
|
||||
line: 669
|
||||
line: 670
|
||||
errormsg: "type mismatch"
|
||||
"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user