fix some issues with --backend (#14363)
* fix some issues with --backend * fix https://github.com/timotheecour/Nim/issues/175; improve upon #14306
This commit is contained in:
parent
c32e1378eb
commit
c777f2fb60
11 changed files with 125 additions and 59 deletions
|
|
@ -306,13 +306,14 @@ proc isVSCompatible*(conf: ConfigRef): bool =
|
|||
proc getConfigVar(conf: ConfigRef; c: TSystemCC, suffix: string): string =
|
||||
# use ``cpu.os.cc`` for cross compilation, unless ``--compileOnly`` is given
|
||||
# for niminst support
|
||||
let fullSuffix =
|
||||
case conf.backend
|
||||
of backendCpp, backendJs, backendObjc: "." & $conf.backend & suffix
|
||||
of backendC: suffix
|
||||
else:
|
||||
doAssert false
|
||||
""
|
||||
var fullSuffix = suffix
|
||||
case conf.backend
|
||||
of backendCpp, backendJs, backendObjc: fullSuffix = "." & $conf.backend & suffix
|
||||
of backendC: discard
|
||||
of backendInvalid:
|
||||
# during parsing of cfg files; we don't know the backend yet, no point in
|
||||
# guessing wrong thing
|
||||
return ""
|
||||
|
||||
if (conf.target.hostOS != conf.target.targetOS or conf.target.hostCPU != conf.target.targetCPU) and
|
||||
optCompileOnly notin conf.globalOptions:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue