cross compilation targetting windows now supports nim r: nim r -d:mingw main (#18682)

* cross compilation targetting windows now supports `nim r`: `nim r -d:mingw main`

* quoteShell

* address comment: remove `conf.getConfigVar("nimrun.exe")`
This commit is contained in:
Timothee Cour 2021-08-16 00:32:12 -07:00 • committed by GitHub
commit 1acba63cb7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 5 deletions

View file

@ -317,6 +317,8 @@ To cross-compile for Windows from Linux or macOS using the MinGW-w64 toolchain:
.. code:: cmd
nim c -d:mingw myproject.nim
# `nim r` also works, running the binary via `wine` or `wine64`:
nim r -d:mingw --eval:'import os; echo "a" / "b"'
Use `--cpu:i386`:option: or `--cpu:amd64`:option: to switch the CPU architecture.