build: supports LLGoFiles in patches
This commit is contained in:
@@ -359,6 +359,10 @@ func buildAllPkgs(ctx *context, initial []*packages.Package, verbose bool) (pkgs
|
|||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
aPkg.LinkArgs = append(cgoLdflags, pkg.ExportFile)
|
aPkg.LinkArgs = append(cgoLdflags, pkg.ExportFile)
|
||||||
|
aPkg.LinkArgs = append(aPkg.LinkArgs, concatPkgLinkFiles(ctx, pkg, verbose)...)
|
||||||
|
if aPkg.AltPkg != nil {
|
||||||
|
aPkg.LinkArgs = append(aPkg.LinkArgs, concatPkgLinkFiles(ctx, aPkg.AltPkg.Package, verbose)...)
|
||||||
|
}
|
||||||
setNeedRuntimeOrPyInit(ctx, pkg, prog.NeedRuntime, prog.NeedPyInit)
|
setNeedRuntimeOrPyInit(ctx, pkg, prog.NeedRuntime, prog.NeedPyInit)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -106,6 +106,7 @@ type loader struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type Cached struct {
|
type Cached struct {
|
||||||
|
*packages.Package
|
||||||
Types *types.Package
|
Types *types.Package
|
||||||
TypesInfo *types.Info
|
TypesInfo *types.Info
|
||||||
Syntax []*ast.File
|
Syntax []*ast.File
|
||||||
@@ -189,6 +190,7 @@ func loadPackageEx(dedup Deduper, ld *loader, lpkg *loaderPackage) {
|
|||||||
defer func() {
|
defer func() {
|
||||||
if !lpkg.IllTyped && lpkg.needtypes && lpkg.needsrc {
|
if !lpkg.IllTyped && lpkg.needtypes && lpkg.needsrc {
|
||||||
dedup.set(lpkg.PkgPath, &Cached{
|
dedup.set(lpkg.PkgPath, &Cached{
|
||||||
|
Package: lpkg.Package,
|
||||||
Types: lpkg.Types,
|
Types: lpkg.Types,
|
||||||
TypesInfo: lpkg.TypesInfo,
|
TypesInfo: lpkg.TypesInfo,
|
||||||
Syntax: lpkg.Syntax,
|
Syntax: lpkg.Syntax,
|
||||||
|
|||||||
Reference in New Issue
Block a user