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

Method Detect

configs/toolchain_linux.go:176–209  ·  view source on GitHub ↗

Detect detect local installed gcc.

(platformName string)

Source from the content-addressed store, hash-verified

174
175// Detect detect local installed gcc.
176func (t *Toolchain) Detect(platformName string) error {
177 if platformName == "" {
178 if err := buildtools.CheckTools(t.ctx, platformName); err != nil {
179 return err
180 }
181 }
182
183 t.Url = "file:////usr/bin"
184 t.Path = "/usr/bin"
185 t.Name = "gcc"
186 t.SystemName = "Linux"
187 t.SystemProcessor = "x86_64"
188 t.Host = "x86_64-linux-gnu"
189 t.CrosstoolPrefix = "x86_64-linux-gnu-"
190 t.CC = "x86_64-linux-gnu-gcc"
191 t.CXX = "x86_64-linux-gnu-g++"
192 t.RANLIB = "x86_64-linux-gnu-gcc-ranlib"
193 t.AR = "x86_64-linux-gnu-gcc-ar"
194 t.LD = "x86_64-linux-gnu-ld"
195 t.NM = "x86_64-linux-gnu-nm"
196 t.OBJDUMP = "x86_64-linux-gnu-objdump"
197 t.STRIP = "x86_64-linux-gnu-strip"
198 t.OBJCOPY = "x86_64-linux-gnu-objcopy"
199
200 if err := t.Validate(); err != nil {
201 return err
202 }
203
204 if err := t.CheckAndRepair(true); err != nil {
205 return err
206 }
207
208 return nil
209}
210
211// Detect no msvc in linux.
212func (w *WindowsKit) Detect(msvc *context.MSVC) error {

Callers

nothing calls this directly

Calls 3

ValidateMethod · 0.95
CheckAndRepairMethod · 0.95
CheckToolsFunction · 0.92

Tested by

no test coverage detected