Skip to content

strict cc = vcc ordering restriction in nim.cfg #10757

Open
@slomp

Description

@slomp

I noticed that if I use cc = vcc in a nim.cfg file, the cc assignment has to happen before any other compiler flag listing, otherwise cl.exe can't be found by vccexe.

Example

This will not work:

noMain
nimcache:"nimcache"
cc = vcc

Current Output

vccexe.nim(61)           vccexe
osproc.nim(585)          startProcess
oserr.nim(66)            raiseOSError
Error: unhandled exception: The system cannot find the file specified.
; Additional info: "Requested command not found: \'cl.exe\'. OS error:" [OSError]

Expected Output

No special output expected.

Possible Solution

By having cc = vcc assignments happen before any other compiler switch, it works:

cc = vcc
noMain
nimcache:"nimcache"

Additional Information

This seems to affect only vcc; with other choices of compilers (I tested with gcc and clang), the order in which cc is specified/reassigned does not matter.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions