Skip to content

Apple: merge per-arch sysroot parameters if all are the same

Gregor Jasny requested to merge gjasny/cmake:merge-same-sysroot into master

Since !4125 (merged) CMake supports "fat" builds with different sysroots. Those are passed to the compiler with the -Xarch_<xyz> parameter.

Unfortunately this breaks the Compiler Cache (ccache) because it does not support those compiler flags: https://github.com/ccache/ccache/blob/v3.7.9/src/ccache.c#L2700-L2705

This change restores the caching ability for certain "fat" build configurations (e.g. arm64 and armv7) where the sysroot is the same for all selected architectures and thus a plain -isysroot parameter could be used.

Backport: release
Topic-rename: apple-merge-same-sysroot

Edited by Brad King

Merge request reports