Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for BuildModeShared (0.37 sec)

  1. src/cmd/link/internal/ld/config.go

    // in cmd/go, and are documented in 'go help buildmode'.
    type BuildMode uint8
    
    const (
    	BuildModeUnset BuildMode = iota
    	BuildModeExe
    	BuildModePIE
    	BuildModeCArchive
    	BuildModeCShared
    	BuildModeShared
    	BuildModePlugin
    )
    
    // Set implements flag.Value to set the build mode based on the argument
    // to the -buildmode flag.
    func (mode *BuildMode) Set(s string) error {
    	switch s {
    	default:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 23 05:14:11 UTC 2023
    - 5.6K bytes
    - Viewed (0)
  2. src/cmd/link/internal/ld/target.go

    	IsELF         bool
    }
    
    //
    // Target type functions
    //
    
    func (t *Target) IsExe() bool {
    	return t.BuildMode == BuildModeExe
    }
    
    func (t *Target) IsShared() bool {
    	return t.BuildMode == BuildModeShared
    }
    
    func (t *Target) IsPlugin() bool {
    	return t.BuildMode == BuildModePlugin
    }
    
    func (t *Target) IsInternal() bool {
    	return t.LinkMode == LinkInternal
    }
    
    func (t *Target) IsExternal() bool {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 13 21:14:48 UTC 2022
    - 3.9K bytes
    - Viewed (0)
  3. src/cmd/link/internal/ld/main.go

    	}
    
    	if !buildcfg.Experiment.RegabiWrappers {
    		abiInternalVer = 0
    	}
    
    	startProfile()
    	if ctxt.BuildMode == BuildModeUnset {
    		ctxt.BuildMode.Set("exe")
    	}
    
    	if ctxt.BuildMode != BuildModeShared && flag.NArg() != 1 {
    		usage()
    	}
    
    	if *flagOutfile == "" {
    		*flagOutfile = "a.out"
    		if ctxt.HeadType == objabi.Hwindows {
    			*flagOutfile += ".exe"
    		}
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 16:59:50 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  4. src/cmd/link/internal/ld/inittask.go

    		// Make symbol local so multiple plugins don't clobber each other's inittask list.
    		ctxt.loader.SetAttrLocal(ctxt.mainInittasks, true)
    	case BuildModeShared:
    		// For a shared library, all packages are roots.
    		var roots []string
    		for _, lib := range ctxt.Library {
    			roots = append(roots, fmt.Sprintf("%s..inittask", objabi.PathToPrefix(lib.Pkg)))
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 30 20:09:45 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  5. src/cmd/go/internal/work/action.go

    			Target:  hdrTarget,
    		}
    		a.Deps = append(a.Deps, ah)
    	}
    }
    
    // buildmodeShared takes the "go build" action a1 into the building of a shared library of a1.Deps.
    // That is, the input a1 represents "go build pkgs" and the result represents "go build -buildmode=shared pkgs".
    func (b *Builder) buildmodeShared(mode, depMode BuildMode, args []string, pkgs []*load.Package, a1 *Action) *Action {
    	name, err := libname(args, pkgs)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 18 15:39:17 UTC 2024
    - 32.7K bytes
    - Viewed (0)
  6. src/cmd/link/internal/ld/lib.go

    // in separate shared libraries linked together at runtime.
    func (ctxt *Link) DynlinkingGo() bool {
    	if !ctxt.Loaded {
    		panic("DynlinkingGo called before all symbols loaded")
    	}
    	return ctxt.BuildMode == BuildModeShared || ctxt.linkShared || ctxt.BuildMode == BuildModePlugin || ctxt.canUsePlugins
    }
    
    // CanUsePlugins reports whether a plugins can be used
    func (ctxt *Link) CanUsePlugins() bool {
    	if !ctxt.Loaded {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 18:45:27 UTC 2024
    - 88.6K bytes
    - Viewed (0)
  7. src/cmd/go/internal/work/build.go

    		b.Do(ctx, a)
    		return
    	}
    
    	a := &Action{Mode: "go build"}
    	for _, p := range pkgs {
    		a.Deps = append(a.Deps, b.AutoAction(ModeBuild, depMode, p))
    	}
    	if cfg.BuildBuildmode == "shared" {
    		a = b.buildmodeShared(ModeBuild, depMode, args, pkgs, a)
    	}
    	b.Do(ctx, a)
    }
    
    var CmdInstall = &base.Command{
    	UsageLine: "go install [build flags] [packages]",
    	Short:     "compile and install packages and dependencies",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 21 17:22:59 UTC 2024
    - 33.2K bytes
    - Viewed (0)
  8. src/cmd/link/internal/ld/deadcode.go

    	d.genericIfaceMethod = make(map[string]bool)
    	if buildcfg.Experiment.FieldTrack {
    		d.ldr.Reachparent = make([]loader.Sym, d.ldr.NSym())
    	}
    	d.dynlink = d.ctxt.DynlinkingGo()
    
    	if d.ctxt.BuildMode == BuildModeShared {
    		// Mark all symbols defined in this library as reachable when
    		// building a shared library.
    		n := d.ldr.NDef()
    		for i := 1; i < n; i++ {
    			s := loader.Sym(i)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 14:52:41 UTC 2024
    - 19K bytes
    - Viewed (0)
  9. src/cmd/link/internal/ld/elf.go

    			shstrtabAddstring(".note.go.deps")
    		}
    	}
    
    	hasinitarr := ctxt.linkShared
    
    	/* shared library initializer */
    	switch ctxt.BuildMode {
    	case BuildModeCArchive, BuildModeCShared, BuildModeShared, BuildModePlugin:
    		hasinitarr = true
    	}
    
    	if hasinitarr {
    		shstrtabAddstring(".init_array")
    		shstrtabAddstring(elfRelType + ".init_array")
    	}
    
    	if !*FlagS {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 22 13:29:54 UTC 2024
    - 63.6K bytes
    - Viewed (0)
  10. src/cmd/link/internal/ld/symtab.go

    				}
    			} else {
    				symGroupType[s] = sym.STYPE
    				if symtyperel != 0 {
    					ldr.SetCarrierSym(s, symtype)
    				}
    			}
    		}
    	}
    
    	if ctxt.BuildMode == BuildModeShared {
    		abihashgostr := ldr.CreateSymForUpdate("go:link.abihash."+filepath.Base(*flagOutfile), 0)
    		abihashgostr.SetType(sym.SRODATA)
    		hashsym := ldr.LookupOrCreateSym("go:link.abihashbytes", 0)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 13 16:29:40 UTC 2023
    - 29.2K bytes
    - Viewed (0)
Back to top