From 923149da444c7caa524a61880942a600c4c9e0bc Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sat, 24 Oct 2026 02:43:42 +0900 Subject: internal/rosa: bootstrap cmake in two steps This enables cross-compilation via the standard CMake helper. Signed-off-by: Ophestra --- internal/rosa/cmake.go | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'internal/rosa/cmake.go') diff --git a/internal/rosa/cmake.go b/internal/rosa/cmake.go index 8cfbf00c..2095c47a 100644 --- a/internal/rosa/cmake.go +++ b/internal/rosa/cmake.go @@ -7,6 +7,8 @@ import ( ) var ( + _cmakeEarly = H("cmake-early") + _cmake = H("cmake") _ninja = H("ninja") ) @@ -16,6 +18,9 @@ type CMakeHelper struct { // Path elements joined with source. Append []string + // Use the bootstrap minimal [MakeHelper] CMake. + Early bool + // Value of CMAKE_BUILD_TYPE. The zero value is equivalent to "Release". BuildType string // CMake CACHE entries. @@ -36,10 +41,15 @@ var _ Helper = new(CMakeHelper) // tools returns the cmake handle alongside either ninja or make. func (attr *CMakeHelper) tools(Toolchain) P { + h := _cmake + if attr != nil && attr.Early { + h = _cmakeEarly + } + if attr != nil && attr.Make { - return P{_cmake, _make} + return P{h, _make} } - return P{_cmake, _ninja} + return P{h, _ninja} } // inputs is a noop. -- cgit v1.3.1