18.4.1. Build-Time Feature Selection - 5.2 English - 57404

AOCL User Guide (57404)

Document ID
57404
Release Date
2025-12-29
Version
5.2 English

AOCL-Utils out-of-the-box is designed to deliver the highest performance where all optimization parameters are preset to their default values.

For applications that need only specific utilities, you can reduce binary size by compiling only the required features using the AU_ENABLE_FEATURES CMake variable.

Syntax:

-DAU_ENABLE_FEATURES=au_core:ThreadPinning,au_core:Status,au_core:Logger,au_core:RNG,au_cpuid:cpuid

Available Features:

  • au_core:ThreadPinning - Thread affinity control utilities

  • au_core:Status - Error handling classes (C++ only)

  • au_core:Logger - Logging utilities

  • au_core:RNG - Random number generation

  • au_cpuid:cpuid - CPU detection and feature flags

Example - Enable only ThreadPinning and Status features:

cmake -B build \
      -DAU_ENABLE_FEATURES=au_core:ThreadPinning,au_core:Status \
      -DCMAKE_BUILD_TYPE=Release

Use Cases:

  • Embedded systems with size constraints

  • Applications needing only specific utilities

  • Reducing attack surface in security-sensitive applications

  • Faster compilation and smaller binaries

Note

If AU_ENABLE_FEATURES is not specified, all features are enabled by default.