forked from rosa/hakurei
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>
This commit is contained in:
+7
-10
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user