MCPcopy Create free account
hub / github.com/celer-pkg/celer / SetupEnvs

Method SetupEnvs

configs/toolchain.go:88–102  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

86}
87
88func (t Toolchain) SetupEnvs() {
89 exrVars := t.ctx.ExprVars()
90 for _, item := range t.Envs {
91 parts := strings.Split(item, "=")
92 if len(parts) != 2 {
93 continue
94 }
95
96 key := parts[0]
97 value := parts[1]
98
99 value = exrVars.Expand(value)
100 os.Setenv(parts[0], env.JoinSpace(value, os.Getenv(key)))
101 }
102}
103
104func (t Toolchain) effectiveFlags(buildType string) (cflags, cxxflags, linkflags []string) {
105 if strings.EqualFold(buildType, "debug") {

Callers

nothing calls this directly

Calls 3

JoinSpaceFunction · 0.92
ExpandMethod · 0.80
ExprVarsMethod · 0.65

Tested by

no test coverage detected