Library selection

To instruct your compiler to use the optimum version of Arm Performance Libraries for your target architecture and implementation, you can use the -armpl (Arm C/C++/Fortran Compiler) or -larmpl (GCC) option . These options also enable the optimized versions of the C mathematical functions declared in the math.h library, tuned scalar and vector implementations of Fortran math intrinsics, and auto-vectorization of mathematical functions (disable this using -fno-simdmath).

Supported options and arguments are:

Arm Compiler
 -armpl  -larmpl

Link to Arm Performance Libraries with
the default settings.

For Arm C/C++/Fortran Compiler, when
-armpl is combined with the -mpcu or
-march options, the compiler chooses
the appropriate (optimal) variant of the
library for your target hardware or



 -DINTEGER32 (Compile)
 -larmpl_lp64 (Link)
Use 32-bit integers.


(Default if using -i8)

 -DINTEGER64 (Compile)
 -larmpl_ilp64 (Link)
Use 64-bit integers.



 -larmpl_lp64 Use the single-threaded library.


(Default if using -fopenmp)

 -larmpl_lp64_mp Use the OpenMP multi-threaded

Separate multiple arguments using a comma, for example: -armpl=<arg1>,<arg2>.

Default option and argument behavior

For information about the default behavior of the -armpl option and its arguments in Arm Compiler for Linux, see the Arm C/C++ Compiler or Arm Fortran Compiler reference guide.

Selecting target architecture

Arm Performance Libraries provides two libraries, one that is optimized for Armv8-A AArch64 Neon-based implementations, and one that is optimized for Armv8-A AArch64 SVE-based implementations. If you want to use -armpl, you must also specify a target microarchitecture, using the -mcpu option, or architecture, using the -march option.

For -mcpu, by default, the compiler will auto-detect the CPU microarchitecture from the build compiler. To change this behavior and specify a particular target instead, set the -mcpu option to a specific target. For a full list of supported targets, see the -mcpu description in the Arm C/C++ Compiler reference documentation or the Arm Fortran Compiler reference documentation.

For -march, you can find a full list of supported arguments in the Arm C/C++ Compiler reference documentation or the Arm Fortran Compiler reference documentation.

Linking against static libraries

The Arm Performance Libraries are supplied in both static and shareable versions, libarmpl_lp64.a and By default, the commands given above link to the shareable version of the library,, if that version exists in the specified directory.

To force linking with the static library, either:

  • Use the compiler flag -static, for example:
    {armclang|armclang++|armflang} driver.{c|cpp|f90} -L${ARMPL_LIBRARIES} -static -larmpl_lp64
  • Insert the name of the static library in the command line, for example:
    {armclang|armclang++|armflang} driver.{c|cpp|f90} ${ARMPL_LIBRARIES}/libarmpl_lp64.a
Previous Next