micropython/docs/develop
Alessandro Gatti b87d73f2e9 tools/mpy_ld.py: Write architecture flags to output natmod if needed.
This commit lets "tools/mpy_ld.py" store architecture flags in generated
MPY files if explicitly requested, like "mpy-cross" does.

To achieve this, a new command-line option ("--arch-flags") was added to
receive the architecture flags value, accepting the same arguments'
format as "mpy-cross", and performing the same input validation.

The rest of the MPY toolchain was also modified to let the user pass the
arch flags to standard native module makefiles.  Given that there's
already a well-established "ARCH" argument, "ARCH_FLAGS" was chosen to
pass the optional flags to "mpy_ld.py".

Finally, documentation was updated to mention the new variable.

Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
2026-01-11 09:22:13 +01:00
..
img docs/develop: Add MicroPython Internals chapter. 2021-01-27 16:59:58 +11:00
cmodules.rst py/py.mk: Add SRC_USERMOD_LIB_ASM to include assembly files. 2024-08-01 12:01:18 +10:00
compiler.rst all: Remove the "STATIC" macro and just use "static" instead. 2024-03-07 14:20:42 +11:00
extendingmicropython.rst docs: Remove trailing spaces and convert tabs to spaces. 2021-12-15 11:49:22 +11:00
gettingstarted.rst tools/ci.sh: Add zsh and fish shell completion support. 2025-11-26 13:50:39 +11:00
index.rst README: Define and describe the port Tier levels. 2025-10-23 11:23:17 +11:00
library.rst all: Remove the "STATIC" macro and just use "static" instead. 2024-03-07 14:20:42 +11:00
maps.rst docs/develop: Add MicroPython Internals chapter. 2021-01-27 16:59:58 +11:00
memorymgt.rst docs/develop: Add MicroPython Internals chapter. 2021-01-27 16:59:58 +11:00
natmod.rst tools/mpy_ld.py: Write architecture flags to output natmod if needed. 2026-01-11 09:22:13 +01:00
optimizations.rst docs/develop/optimizations: Fix typo identified in issue 14391. 2024-04-29 09:20:28 +10:00
porting.rst all: Simplify mp_int_t/mp_uint_t definition. 2025-10-23 15:12:28 +11:00
publiccapi.rst docs/develop: Add MicroPython Internals chapter. 2021-01-27 16:59:58 +11:00
qstr.rst docs: Remove trailing spaces and convert tabs to spaces. 2021-12-15 11:49:22 +11:00
support_tiers.rst README: Define and describe the port Tier levels. 2025-10-23 11:23:17 +11:00
writingtests.rst tests/run-tests.py: Change --target/--device options to --test-instance. 2024-11-04 12:47:47 +11:00