.. Copyright 2026 John Harwell, All rights reserved. SPDX-License-Identifier: MIT .. _usage/compilers: ================ Compiler Support ================ This table summarizes how the supported compilers interact with the variables described on :ref:`usage/configure-time` and :ref:`usage/project-local`. The variables in the table are an attempt at a polymorphic interface for supporting different compilers, cmake style. In the compiler-specific sections that follow, the shown variables have suffixes (``{_GNU,_CLANG,_INTEL}``) which are pure to get the docs to link unambiguously and are not present in the code. .. list-table:: :header-rows: 1 * - LIBRA Variable - gcc/g++ - clang/clang++ - icx/icpx * - :cmake:variable:`LIBRA_DEBUG_INFO` - Yes - Yes - Yes * - :cmake:variable:`LIBRA_BUILD_PROF` - No - Yes - No * - :cmake:variable:`LIBRA_FORTIFY` - Yes - Yes - No * - :cmake:variable:`LIBRA_LTO` - Yes, via cmake builtin - Yes, via cmake builtin - Yes, via cmake builtin * - :cmake:variable:`LIBRA_OPT_LEVEL` - Yes - Yes - Yes * - :cmake:variable:`LIBRA_NATIVE_OPT` - Yes - Yes - Yes * - :cmake:variable:`LIBRA_C_DIAG_CANDIDATES` - Yes - Yes - Yes * - :cmake:variable:`LIBRA_CXX_DIAG_CANDIDATES` - Yes - Yes - Yes * - :cmake:variable:`LIBRA_SAN` - Yes, all types - Yes, all types - Yes, all types * - :cmake:variable:`LIBRA_PGO` - Yes - Yes - Yes * - :cmake:variable:`LIBRA_CODE_COV` - Yes - Yes - No * - :cmake:variable:`LIBRA_VALGRIND_COMPAT` - Yes - Yes - No * - :cmake:variable:`LIBRA_STDLIB` - Yes - Yes - Yes GNU (gcc/g++) ============= .. cmake-module:: ../../cmake/libra/compile/gnu.cmake clang (clang/clang++) ===================== .. cmake-module:: ../../cmake/libra/compile/clang.cmake Intel LLVM (icx/icpx) ===================== .. cmake-module:: ../../cmake/libra/compile/intel.cmake