You copied the Doc URL to your clipboard.

Building an application with microlib

To build a program using microlib, you must use the command-line option --library_type=microlib. You can use this option with the legacy assembler or linker.

Use --library_type=microlib with the linker to override all other options.

Assembler option

armclang --target arm-arm-none-eabi -march=armv8-a -c main.c
armclang --target arm-arm-none-eabi -march=armv8-a -c extra.c
armasm --cpu=8-A.32 --library_type=microlib more.s
armlink --cpu=8-A.32 -o image.axf main.o extra.o more.o

The request to the linker to use microlib is made as a result of assembling more.s with --library_type=microlib.

Linker option

armclang --target arm-arm-none-eabi -march=armv8-a -c main.c
armclang --target arm-arm-none-eabi -march=armv8-a -c extra.c
armlink --cpu=8-A.32 --library_type=microlib -o image.axf main.o extra.o

Neither object file contains the attribute requesting that the linker link against microlib, so the linker selects microlib as a result of being explicitly asked to do so on the command line.