cl.PkgLinkOnly; llgoRoot, llgoPkgLinkFile

This commit is contained in:
xushiwei
2024-05-07 08:05:56 +08:00
parent 0edeb5cfd0
commit 1136526e4c
3 changed files with 41 additions and 17 deletions

View File

@@ -123,6 +123,7 @@ const (
PkgLLGo
PkgNoInit // noinit: a package that don't need to be initialized
PkgDeclOnly // decl: a package that only have declarations
PkgLinkOnly // link: a package that don't need to be compiled but need to be linked
)
type pkgInfo struct {

View File

@@ -58,6 +58,8 @@ func PkgKindOf(pkg *types.Package) int {
// noinit: a package that does not need to be initialized
func pkgKind(v string) int {
switch v {
case "link":
return PkgLinkOnly
case "decl":
return PkgDeclOnly
case "noinit":