Commit Graph

3 Commits

Author SHA1 Message Date
Christian Walther
71a4e34d97 fileAPI: Expose CMAKE_<LANG>_COMPILER_ARG1
Compiler arguments coming from CC environment variables or multi-element
CMAKE_<LANG>_COMPILER variables set by toolchain files were previously not
exposed in the file API. Among other possible problems, this caused clients
to determine wrong system include paths and built-in preprocessor macros by
calling the compiler without these important arguments.

This is fixed by adding an optional "commandFragment" attribute to the
compiler description in the `toolchains` object, containing these arguments
as a command line fragment. This is already the form in which they are
internally stored in the CMAKE_<LANG>_COMPILER_ARG1 variable, so all that is
required is adding this variable to the set of exported variables, besides
some logic to omit it if empty.

Issue: #22568
2025-12-03 07:34:53 +11:00
Christian Walther
1e02926c9a fileAPI: Refactor toolchains schema to prepare for new version
Co-authored-by: Craig Scott <craig.scott@crascit.com>
2025-12-01 12:27:57 +01:00
Craig Scott
aa63990ca9 file API: Add JSON schema files
Fixes: #26987
2025-07-26 18:51:27 +10:00