Detect detect local installed gcc.
(platformName string)
| 174 | |
| 175 | // Detect detect local installed gcc. |
| 176 | func (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. |
| 212 | func (w *WindowsKit) Detect(msvc *context.MSVC) error { |
nothing calls this directly
no test coverage detected