This document outlines a complete strategy to enable selectable debug and release build variants for packages built with pixi-build. The approach is rooted in a modular compiler architecture and is controlled by a custom build variant (profile) in the pixi.toml configuration.
This design centralizes the build configuration logic within the workspace, keeps individual recipe.yaml files clean and declarative, and guarantees ABI compatibility across the entire dependency tree.
Before the build tool can select variants, a modular package structure must exist. This involves separating the compiler toolchain into distinct components and creating special "token" packages to enforce build consistency.