aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/meson.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-07-14 22:13:04 +0900
committerOphestra <cat@gensokyo.uk>2026-07-14 22:17:51 +0900
commit4cf235675a587b98ba51ac7300d5b17367713aac (patch)
tree4520b7fb426e2e07be936543a590ea9ccb0106bd /internal/rosa/meson.go
parent098943ab469be1d95a5555650397d4894f67570e (diff)
internal/rosa/meson: always prepend D
All flags in practice use this convention. An escape hatch is available by leaving the value empty. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/meson.go')
-rw-r--r--internal/rosa/meson.go17
1 files changed, 7 insertions, 10 deletions
diff --git a/internal/rosa/meson.go b/internal/rosa/meson.go
index 569db9b7..b304ffc8 100644
--- a/internal/rosa/meson.go
+++ b/internal/rosa/meson.go
@@ -56,8 +56,8 @@ func (*MesonHelper) wantsDir() (string, bool) { return `"$(mktemp -d)"`, false }
// isPython returns whether the legacy python implementation is used.
func (attr *MesonHelper) isPython() bool {
- return attr != nil &&
- (!attr.Muon || len(attr.SkipTests) != 0 || attr.InteractiveTest)
+ return attr == nil ||
+ !attr.Muon || len(attr.SkipTests) != 0 || attr.InteractiveTest
}
// script generates the cure script.
@@ -106,16 +106,13 @@ func (attr *MesonHelper) script(t Toolchain, name string) string {
` + muon + ` setup \
` + strings.Join(slices.Collect(func(yield func(string) bool) {
for _, v := range append([]KV{
- {"Dwrap_mode", "nofallback"},
- {"Dprefix", "/system"},
- {"Dbuildtype", "release"},
+ {"wrap_mode", "nofallback"},
+ {"prefix", "/system"},
+ {"buildtype", "release"},
}, attr.Setup...) {
- s := "-" + v[0]
- if len(v[0]) > 0 && v[0][0] != 'D' {
- s = "-" + s
- }
+ s := v[0]
if v[1] != "" {
- s += "=" + v[1]
+ s = "-D" + s + "=" + v[1]
}
if !yield(s) {
return