fixes warnings when building csources (#21194)

* replace `symbolfiles` with `incremental`; fixes warnings when build csources

* fixes self conversion warnings
This commit is contained in:
ringabout 2022-12-29 03:41:27 +08:00 • committed by GitHub
commit 646932b3f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -168,11 +168,11 @@ proc parseCmdLine(c: var ConfigData) =
next(p)
var kind = p.kind
var key = p.key
var val = p.val.string
var val = p.val
case kind
of cmdArgument:
if c.actions == {}:
for a in split(normalize(key.string), {';', ','}):
for a in split(normalize(key), {';', ','}):
case a
of "csource": incl(c.actions, actionCSource)
of "scripts": incl(c.actions, actionScripts)
@ -183,11 +183,11 @@ proc parseCmdLine(c: var ConfigData) =
of "deb": incl(c.actions, actionDeb)
else: quit(Usage)
else:
c.infile = addFileExt(key.string, "ini")
c.nimArgs = cmdLineRest(p).string
c.infile = addFileExt(key, "ini")
c.nimArgs = cmdLineRest(p)
break
of cmdLongOption, cmdShortOption:
case normalize(key.string)
case normalize(key)
of "help", "h":
stdout.write(Usage)
quit(0)
@ -544,7 +544,7 @@ proc srcdist(c: var ConfigData) =
var dir = getOutputDir(c) / buildDir(osA, cpuA)
if dirExists(dir): removeDir(dir)
createDir(dir)
var cmd = ("$# compile -f --symbolfiles:off --compileonly " &
var cmd = ("$# compile -f --incremental:off --compileonly " &
"--gen_mapping --cc:gcc --skipUserCfg" &
" --os:$# --cpu:$# $# $#") %
[findNim(), osname, cpuname, c.nimArgs, c.mainfile]