github.com/metux/go-metabuild@v0.0.0-20240118143255-d9ed5ab697f9/util/compiler/probe/gcc.go (about) 1 package probe 2 3 import ( 4 cmdrun "github.com/metux/go-metabuild/util/cmd" 5 "github.com/metux/go-metabuild/util/compiler/base" 6 ) 7 8 func probeGCC(ci *base.CompilerInfo) bool { 9 ci.Id = base.CompilerGCC 10 ci.Machine = base.ParseMachine(ci.RunCatchOut("-dumpmachine")) 11 ci.Version = ci.RunCatchOut("-dumpversion") 12 ci.Sysroot = ci.RunCatchOut("-print-sysroot") 13 ci.Archiver = cmdrun.StrCmdline(probeArCmd(ci)) 14 return ci.Version != "" 15 }