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

Method effectiveFlags

configs/toolchain.go:104–127  ·  view source on GitHub ↗
(buildType string)

Source from the content-addressed store, hash-verified

102}
103
104func (t Toolchain) effectiveFlags(buildType string) (cflags, cxxflags, linkflags []string) {
105 if strings.EqualFold(buildType, "debug") {
106 if len(t.CFlagsDebug) > 0 {
107 cflags = t.CFlagsDebug
108 } else {
109 cflags = t.CFlags
110 }
111
112 if len(t.CXXFlagsDebug) > 0 {
113 cxxflags = t.CXXFlagsDebug
114 } else {
115 cxxflags = t.CXXFlags
116 }
117
118 if len(t.LinkFlagsDebug) > 0 {
119 linkflags = t.LinkFlagsDebug
120 } else {
121 linkflags = t.LinkFlags
122 }
123 return cflags, cxxflags, linkflags
124 }
125
126 return t.CFlags, t.CXXFlags, t.LinkFlags
127}
128
129func (t Toolchain) generate(toolchain *strings.Builder) error {
130 writeIfNotEmpty := func(key, value string) {

Callers 2

generateMethod · 0.95

Calls

no outgoing calls

Tested by 1