aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/rosa.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/rosa/rosa.go')
-rw-r--r--internal/rosa/rosa.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/internal/rosa/rosa.go b/internal/rosa/rosa.go
index 2241788f..7123de6e 100644
--- a/internal/rosa/rosa.go
+++ b/internal/rosa/rosa.go
@@ -340,6 +340,8 @@ type PackageAttr struct {
// Whether the [Helper] behaves identically across all architectures.
NoArch bool
+ // Whether libc can be omitted.
+ NoLibc bool
// Inputs added only during cross-compilation.
Cross P
// Native utilities used by the build process.
@@ -434,7 +436,7 @@ func (t Toolchain) New(
cross := t.cross()
var rootCross []pkg.Artifact
if cross {
- rootCross = make([]pkg.Artifact, 0, len(inputs)+len(attr.Cross))
+ rootCross = make([]pkg.Artifact, 0, 1+len(inputs)+len(attr.Cross))
}
const lcMessages = "LC_MESSAGES=C.UTF-8"
@@ -534,6 +536,9 @@ func (t Toolchain) New(
root = t.appendHandle(root, spv, p)
}
} else {
+ if !attr.NoLibc {
+ rootCross = t.appendHandle(rootCross, spv, _musl)
+ }
for _, p := range inputs {
rootCross = t.appendHandle(rootCross, spv, p)
}