changed LTO logic to match per-default enabled LTO in upstream Archlinux

This commit is contained in:
2021-12-21 22:33:42 +01:00
parent 4bd831142f
commit 5432ea326d
2 changed files with 14 additions and 12 deletions

View File

@@ -120,10 +120,10 @@ func (b *BuildManager) buildWorker(id int, march string) {
pkg.PkgFiles = []string{}
// default to LTO
makepkgFile := "makepkg-%s-lto.conf"
makepkgFile := makepkg
if pkg.DbPackage.Lto == dbpackage.LtoDisabled || pkg.DbPackage.Lto == dbpackage.LtoAutoDisabled {
// use non-lto makepkg.conf if LTO is blacklisted for this package
makepkgFile = "makepkg-%s.conf"
makepkgFile = makepkgLTO
}
cmd := exec.Command("sh", "-c",
"cd "+filepath.Dir(pkg.Pkgbuild)+"&&makechrootpkg -c -D "+filepath.Join(conf.Basedir.Work, makepkgDir)+" -l worker-"+march+"-"+strconv.Itoa(id)+" -r "+filepath.Join(conf.Basedir.Work, chrootDir)+" -- "+