diff options
author | Francis Thérien <frtherien@gmail.com> | 2023-02-22 15:10:02 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-22 21:10:02 +0100 |
commit | 7dc80a7fefb0d2cecbdc2696c71ea2fa94d6aa76 (patch) | |
tree | 27c51ebcf98982f7ab8dffeb1c5caf474640d880 /doc | |
parent | 38f876dd484fc1a3ce44788b1ed9601eea8619f6 (diff) | |
download | Nim-7dc80a7fefb0d2cecbdc2696c71ea2fa94d6aa76.tar.gz |
Mitigate issues related to compiler options when cross-compiling (#21330)
* Document C compiler options config when cross-compiling * Allow empty string to override default
Diffstat (limited to 'doc')
-rw-r--r-- | doc/nimc.md | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/doc/nimc.md b/doc/nimc.md index 81a060d8a..7b0e99e06 100644 --- a/doc/nimc.md +++ b/doc/nimc.md @@ -316,14 +316,16 @@ Another way is to make Nim invoke a cross compiler toolchain: nim c --cpu:arm --os:linux myproject.nim ``` -For cross compilation, the compiler invokes a C compiler named -like `$cpu.$os.$cc` (for example arm.linux.gcc) and the configuration -system is used to provide meaningful defaults. For example for `ARM` your +For cross compilation, the compiler invokes a C compiler named like +`$cpu.$os.$cc` (for example `arm.linux.gcc`) with options defined in +`$cpu.$os.$cc.options.always`. The configuration system is used to provide +meaningful defaults. For example, for Linux on a 32-bit ARM CPU, your configuration file should contain something like: arm.linux.gcc.path = "/usr/bin" arm.linux.gcc.exe = "arm-linux-gcc" arm.linux.gcc.linkerexe = "arm-linux-gcc" + arm.linux.gcc.options.always = "-w -fmax-errors=3" Cross-compilation for Windows ============================= |