forked from ALHP/ALHP.GO
Compare commits
2 Commits
feat/addit
...
feat/rust_
Author | SHA1 | Date | |
---|---|---|---|
![]() |
20ea64acdc | ||
be46f92cbe |
6
utils.go
6
utils.go
@@ -727,10 +727,14 @@ func setupMakepkg(march string) error {
|
|||||||
}
|
}
|
||||||
makepkgStr = strings.ReplaceAll(makepkgStr, " color ", " !color ")
|
makepkgStr = strings.ReplaceAll(makepkgStr, " color ", " !color ")
|
||||||
// Add align-functions=32, see https://github.com/InBetweenNames/gentooLTO/issues/164 for more
|
// Add align-functions=32, see https://github.com/InBetweenNames/gentooLTO/issues/164 for more
|
||||||
makepkgStr = strings.ReplaceAll(makepkgStr, "-O2", "-O3 -falign-functions=32 -mpclmul -fdevirtualize-at-ltrans -fgcse-sm -fgcse-las -flive-range-shrinkage -fira-loop-pressure -fsched-pressure -fmodulo-sched -fmodulo-sched-allow-regmoves -freschedule-modulo-scheduled-loops -fdelete-dead-exceptions -fgraphite -fgraphite-identity -fsplit-stack -fipa-pta -fisolate-erroneous-paths-attribute -fira-region=mixed -fsimd-cost-model=dynamic -frename-registers -fweb -ftree-vectorize -flto-partition=one -ffinite-loops")
|
makepkgStr = strings.ReplaceAll(makepkgStr, "-O2", "-O3 -falign-functions=32 -mpclmul -fdevirtualize-at-ltrans")
|
||||||
makepkgStr = strings.ReplaceAll(makepkgStr, "#MAKEFLAGS=\"-j2\"", "MAKEFLAGS=\"-j"+strconv.Itoa(conf.Build.Makej)+"\"")
|
makepkgStr = strings.ReplaceAll(makepkgStr, "#MAKEFLAGS=\"-j2\"", "MAKEFLAGS=\"-j"+strconv.Itoa(conf.Build.Makej)+"\"")
|
||||||
makepkgStr = reMarch.ReplaceAllString(makepkgStr, "${1}"+march)
|
makepkgStr = reMarch.ReplaceAllString(makepkgStr, "${1}"+march)
|
||||||
makepkgStr = strings.ReplaceAll(makepkgStr, "#PACKAGER=\"John Doe <john@doe.com>\"", "PACKAGER=\"ALHP "+march+" <alhp@harting.dev>\"")
|
makepkgStr = strings.ReplaceAll(makepkgStr, "#PACKAGER=\"John Doe <john@doe.com>\"", "PACKAGER=\"ALHP "+march+" <alhp@harting.dev>\"")
|
||||||
|
// enable rust flags and patch them
|
||||||
|
makepkgStr = strings.ReplaceAll(makepkgStr, "#RUSTFLAGS=", "RUSTFLAGS=")
|
||||||
|
makepkgStr = strings.ReplaceAll(makepkgStr, "-C opt-level=2", "-C opt-level=3")
|
||||||
|
makepkgStr = strings.ReplaceAll(makepkgStr, "-C opt-level=3", "-C opt-level=3 -C target-cpu="+march+" -C lto=fat -C codegen-units=1 -C strip=symbols -C linker-plugin-lto")
|
||||||
|
|
||||||
// write makepkg
|
// write makepkg
|
||||||
err = os.WriteFile(lMakepkg, []byte(makepkgStr), 0644)
|
err = os.WriteFile(lMakepkg, []byte(makepkgStr), 0644)
|
||||||
|
Reference in New Issue
Block a user