summary refs log tree commit diff stats
path: root/config
diff options
context:
space:
mode:
authorFederico Ceratto <federico@debian.org>2022-02-07 23:05:41 +0000
committerGitHub <noreply@github.com>2022-02-07 18:05:41 -0500
commit4b0636fba018df407237811f9e687ed4fc249c10 (patch)
tree34916bfcf2e6d42073491fadac8c6d63d6aa1f3f /config
parent28180e47a99cda88abee3e2d8e130c18100f3a4f (diff)
downloadNim-4b0636fba018df407237811f9e687ed4fc249c10.tar.gz
Add compilers and hints to default nim.cfg (#18424)
Diffstat (limited to 'config')
-rw-r--r--config/nim.cfg15
1 files changed, 13 insertions, 2 deletions
diff --git a/config/nim.cfg b/config/nim.cfg
index 59d7f48d2..7fe279f56 100644
--- a/config/nim.cfg
+++ b/config/nim.cfg
@@ -2,6 +2,7 @@
 # (c) 2017 Andreas Rumpf
 
 # Feel free to edit the default values as you need.
+# See https://nim-lang.org/docs/nimc.html
 
 # You may set environment variables with
 # @putenv "key" "val"
@@ -17,11 +18,21 @@ hint[LineTooLong]=off
 #hint[XDeclaredButNotUsed]=off
 
 # Examples of how to setup a cross-compiler:
+# Nim can target architectures and OSes different than the local host
+# Syntax: <arch>.<os>.gcc.exe = "<compiler executable>"
+#         <arch>.<os>.gcc.linkerexe = "<linker executable>"
 
-# Cross-compiling for Raspberry Pi.
-# (This compiler is available in gcc-arm-linux-gnueabihf package on Ubuntu)
+# ARM e.g. Raspberry Pi 2: gcc-arm-linux-gnueabihf package on Debian/Ubuntu
 arm.linux.gcc.exe = "arm-linux-gnueabihf-gcc"
 arm.linux.gcc.linkerexe = "arm-linux-gnueabihf-gcc"
+# ARM64/aarch64 e.g. Raspberry Pi 3: gcc-aarch64-linux-gnu package on Debian/Ubuntu
+arm64.linux.gcc.exe = "aarch64-linux-gnu-gcc"
+arm64.linux.gcc.linkerexe = "aarch64-linux-gnu-gcc"
+# RISC-V: gcc-riscv64-linux-gnu package on Debian/Ubuntu
+riscv32.linux.gcc.exe = "riscv64-linux-gnu-gcc"
+riscv32.linux.gcc.linkerexe = "riscv64-linux-gnu-gcc"
+riscv64.linux.gcc.exe = "riscv64-linux-gnu-gcc"
+riscv64.linux.gcc.linkerexe = "arm-linux-gnueabihf-gcc"
 
 # For OpenWRT, you will also need to adjust PATH to point to your toolchain.
 mips.linux.gcc.exe = "mips-openwrt-linux-gcc"