diff options
Diffstat (limited to 'internal/rosa/make.go')
| -rw-r--r-- | internal/rosa/make.go | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/internal/rosa/make.go b/internal/rosa/make.go index f46780f5..bf0f3cea 100644 --- a/internal/rosa/make.go +++ b/internal/rosa/make.go @@ -5,7 +5,10 @@ import ( "strings" ) -var _make = H("make") +var ( + _make = H("make") + _makeEarly = H("make-early") +) // MakeHelper wraps the make program and its surrounding build system. type MakeHelper struct { @@ -37,6 +40,8 @@ type MakeHelper struct { // Target triple, zero value is equivalent to the Rosa OS triple. Build string + // Use the dependency-free [GenericHelper] make. + Early bool // Extra make targets. Make []string // Whether to skip the check target. @@ -53,15 +58,20 @@ var _ Helper = new(MakeHelper) // tools returns make and other optional dependencies. func (attr *MakeHelper) tools() P { + h := _make + if attr != nil && attr.Early { + h = _makeEarly + } + if attr == nil || !attr.OmitDefaults { return P{ - _make, + h, _awk, _coreutils, } } - return P{_make} + return P{h} } // inputs is a noop. @@ -107,8 +117,8 @@ func (attr *MakeHelper) script(t Toolchain, name string) string { target := t.triple() if cross { configure += ` -export CC='clang --target=` + target + ` --sysroot=/system/` + t.arch + `' -export CXX='clang++ --target=` + target + ` --sysroot=/system/` + t.arch + `' +export CC='clang --target=` + target + ` -isysroot=/system/` + t.arch + `' +export CXX='clang++ --target=` + target + ` -isysroot=/system/` + t.arch + `' ` } |
