forked from ALHP/ALHP.GO
Compare commits
5 Commits
fix/PR_109
...
feat/optim
Author | SHA1 | Date | |
---|---|---|---|
97b3d4f2c8 | |||
65d6e7e135 | |||
dd118c5f97 | |||
ca85586118 | |||
78666f9899 |
3
main.go
3
main.go
@@ -408,9 +408,12 @@ func (b *BuildManager) syncWorker(ctx context.Context) error {
|
|||||||
eligible, err := pkg.isEligible(ctx)
|
eligible, err := pkg.isEligible(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Infof("Unable to determine status for package %s: %v", pkg.Pkgbase, err)
|
log.Infof("Unable to determine status for package %s: %v", pkg.Pkgbase, err)
|
||||||
|
b.repoPurge[pkg.FullRepo] <- []*ProtoPackage{pkg}
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
if !eligible {
|
if !eligible {
|
||||||
log.Debugf("skipped package %s (%v)", pkg.Pkgbase, err)
|
log.Debugf("skipped package %s (%v)", pkg.Pkgbase, err)
|
||||||
|
b.repoPurge[pkg.FullRepo] <- []*ProtoPackage{pkg}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -698,10 +698,20 @@ func (p *ProtoPackage) findPkgFiles() error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if p.DbPackage == nil && p.Srcinfo == nil {
|
||||||
|
return fmt.Errorf("unable to find pkgfiles without dbpkg or srcinfo present")
|
||||||
|
}
|
||||||
|
|
||||||
var realPkgs []string
|
var realPkgs []string
|
||||||
|
if p.DbPackage != nil {
|
||||||
for _, realPkg := range p.DbPackage.Packages {
|
for _, realPkg := range p.DbPackage.Packages {
|
||||||
realPkgs = append(realPkgs, realPkg)
|
realPkgs = append(realPkgs, realPkg)
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
for _, realPkg := range p.Srcinfo.Packages {
|
||||||
|
realPkgs = append(realPkgs, realPkg.Pkgname)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var fPkg []string
|
var fPkg []string
|
||||||
for _, file := range pkgs {
|
for _, file := range pkgs {
|
||||||
|
3
utils.go
3
utils.go
@@ -262,6 +262,7 @@ func genQueue(path string) ([]*ProtoPackage, error) {
|
|||||||
March: march,
|
March: march,
|
||||||
FullRepo: mPkgbuild.Repo() + "-" + march,
|
FullRepo: mPkgbuild.Repo() + "-" + march,
|
||||||
Hash: b3s,
|
Hash: b3s,
|
||||||
|
DbPackage: dbPkg,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -725,6 +726,8 @@ func setupMakepkg(march string) error {
|
|||||||
makepkgStr = strings.ReplaceAll(makepkgStr, " check ", " !check ")
|
makepkgStr = strings.ReplaceAll(makepkgStr, " check ", " !check ")
|
||||||
}
|
}
|
||||||
makepkgStr = strings.ReplaceAll(makepkgStr, " color ", " !color ")
|
makepkgStr = strings.ReplaceAll(makepkgStr, " color ", " !color ")
|
||||||
|
// set Go optimization flag
|
||||||
|
makepkgStr = strings.ReplaceAll(makepkgStr, "LDFLAGS=", "GOAMD64="+march[len(march)-2:]+\nLDFLAGS=")
|
||||||
// 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")
|
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)+"\"")
|
||||||
|
Reference in New Issue
Block a user