New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
switch("cpu", "i386") with --cc:vcc doesn't work when it is written on *.nims #10387
Comments
Output when I add f:\temp>nim c --listcmd --os:nintendoswitch test.nim
Hint: used config file 'f:\project\nim-lang\Nim\config\nim.cfg' [Conf]
Hint: used config file 'f:\project\nim-lang\Nim\config\config.nims' [Conf]
Hint: system [Processing]
Hint: widestrs [Processing]
Hint: io [Processing]
Hint: test [Processing]
cannot create directory: \tmp\nimcache\test\debug test.nims: switch("os", "nintendoswitch") Output when I set f:\temp>nim c --listcmd test.nim
Hint: used config file 'f:\project\nim-lang\Nim\config\nim.cfg' [Conf]
Hint: used config file 'f:\project\nim-lang\Nim\config\config.nims' [Conf]
Hint: system [Processing]
Hint: widestrs [Processing]
Hint: io [Processing]
Hint: test [Processing]
gcc.exe -c -w -mno-ms-bitfields -If:\project\nim-lang\Nim\lib -If:\temp -o f:\temp\nimcache\test\debug\stdlib_indexerrors.c
.o f:\temp\nimcache\test\debug\stdlib_indexerrors.c
gcc.exe -c -w -mno-ms-bitfields -If:\project\nim-lang\Nim\lib -If:\temp -o f:\temp\nimcache\test\debug\stdlib_switch_memory
.c.o f:\temp\nimcache\test\debug\stdlib_switch_memory.c
gcc.exe -c -w -mno-ms-bitfields -If:\project\nim-lang\Nim\lib -If:\temp -o f:\temp\nimcache\test\debug\stdlib_widestrs.c.o
f:\temp\nimcache\test\debug\stdlib_widestrs.c
gcc.exe -c -w -mno-ms-bitfields -If:\project\nim-lang\Nim\lib -If:\temp -o f:\temp\nimcache\test\debug\stdlib_io.c.o f:\tem
p\nimcache\test\debug\stdlib_io.c
gcc.exe -c -w -mno-ms-bitfields -If:\project\nim-lang\Nim\lib -If:\temp -o f:\temp\nimcache\test\debug\stdlib_system.c.o f:
\temp\nimcache\test\debug\stdlib_system.c
gcc.exe -c -w -mno-ms-bitfields -If:\project\nim-lang\Nim\lib -If:\temp -o f:\temp\nimcache\test\debug\test.c.o f:\temp\nim
cache\test\debug\test.c
Error: execution of an external compiler program 'gcc.exe -c -w -mno-ms-bitfields -If:\project\nim-lang\Nim\lib -If:\temp -
o f:\temp\nimcache\test\debug\stdlib_system.c.o f:\temp\nimcache\test\debug\stdlib_system.c' failed with exit code: 1
f:\temp\nimcache\test\debug\stdlib_system.c:15:10: fatal error: switch/kernel/virtmem.h: No such file or directory
#include <switch/kernel/virtmem.h>
^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated. |
I guess cross compilation configuration in |
switch("cpu", "i386") with --cc:vcc doesn't work when it is written on *.nims
When I set
--cpu:i386
option on nims file, vccexe.exe is called with--platform:amd64
option from Nim and I got following compile error.It looks like Nim compiler trying to build 32bit executable but passing wrong option (it should be
--platform:x86
) to vccexe.exeWhen I set
--cc:vcc --cpu:i386
option on command line, vccexe.exe is called with--platform:x86
option and Nim compiler works without errors.Spec:
Nim: Build from git clone with PR #10383 merged.
OS: Windows 8.1
Backend: Visual Studio 2015
testvcc.nim:
testvcc.nims
Log:
Log (add --cpu:i386 to command line option):
The text was updated successfully, but these errors were encountered: