build: add the X option to the stack directive.

This commit is contained in:
Alexandre Pujol 2024-09-10 18:13:48 +01:00
parent 67c5181ba9
commit f3094cc741
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
6 changed files with 30 additions and 8 deletions

View file

@ -15,7 +15,7 @@ import (
var (
regFlags = regexp.MustCompile(`flags=\(([^)]+)\)`)
regProfileHeader = regexp.MustCompile(` {`)
regProfileHeader = regexp.MustCompile(` {\n`)
)
type SetFlags struct {
@ -43,7 +43,7 @@ func (p SetFlags) Apply() ([]string, error) {
// Overwrite profile flags
if len(flags) > 0 {
flagsStr := " flags=(" + strings.Join(flags, ",") + ") {"
flagsStr := " flags=(" + strings.Join(flags, ",") + ") {\n"
out, err := util.ReadFile(file)
if err != nil {
return res, err