File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -567,6 +567,20 @@ A good start is to use the ``any`` operating target together with the
567
567
If your platform does not provide these functions it should be trivial to
568
568
provide an implementation for them and link these to your program.
569
569
570
+ For targets with very restricted memory, it might be beneficial to pass some
571
+ additional flags to both the Nim compiler and the C compiler and/or linker
572
+ to optimize the build for size. For example, the following flags can be used
573
+ when targetting a gcc compiler:
574
+
575
+ ``--opt:size --passC:-flto --passL:-flto ``
576
+
577
+ The ``--opt:size `` flag instructs nim to optimize code generation for small
578
+ size (with the help of the C compiler), the ``flto `` flags enable link-time
579
+ optimization in the compiler and linker.
580
+
581
+ Check the `Cross compilation ` section for instructions how to compile the
582
+ program for your target.
583
+
570
584
Nim for realtime systems
571
585
========================
572
586
You can’t perform that action at this time.
0 commit comments