Skip to content
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

Add compilers and hints to default nim.cfg #18424

Merged
merged 1 commit into from
Feb 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions config/nim.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -17,11 +18,21 @@ hint[LineTooLong]=off
#hint[XDeclaredButNotUsed]=off

# Examples of how to setup a cross-compiler:
FedericoCeratto marked this conversation as resolved.
Show resolved Hide resolved
# 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"
Expand Down