| 14 | ) |
| 15 | |
| 16 | type Toolchain struct { |
| 17 | Url string `toml:"url"` // Download url or local file url. |
| 18 | SHA256 string `toml:"sha256"` // SHA256 of the toolchain archive, used for verification and caching. |
| 19 | Name string `toml:"name"` // It should be "gcc", "msvc", "clang-cl", "clang" and "msys2". |
| 20 | Version string `toml:"version"` // It should be version of gcc/msvc/clang. |
| 21 | Archive string `toml:"archive,omitempty"` // Archive can be changed to avoid conflict. |
| 22 | Path string `toml:"path"` // Runtime path of tool, it's relative path and would be converted to absolute path later. |
| 23 | SystemName string `toml:"system_name"` // It would be "Windows", "Linux", "Android" and so on. |
| 24 | SystemProcessor string `toml:"system_processor"` // It would be "x86_64", "aarch64" and so on. |
| 25 | Host string `toml:"host"` // It would be "x86_64-linux-gnu", "aarch64-linux-gnu" and so on. |
| 26 | EmbeddedSystem bool `toml:"embedded_system,omitempty"` // Whether it's for embedded system, like mcu or bare-metal. |
| 27 | CrosstoolPrefix string `toml:"crosstool_prefix"` // It would be like "x86_64-linux-gnu-" |
| 28 | |
| 29 | // C/C++ standard. |
| 30 | CStandard string `toml:"c_standard,omitempty"` |
| 31 | CXXStandard string `toml:"cxx_standard,omitempty"` |
| 32 | |
| 33 | // Mandatory fields. |
| 34 | CC string `toml:"cc"` // C language compiler. |
| 35 | CXX string `toml:"cxx"` // C++ language compiler. |
| 36 | |
| 37 | // Compiler target triplets for multi-target compiler drivers (e.g. qcc). |
| 38 | // CMake maps these to CMAKE_C/CXX_COMPILER_TARGET, which translates to -V flags. |
| 39 | // Required when the compiler driver defaults to a different architecture |
| 40 | CCompilerTarget string `toml:"c_compiler_target,omitempty"` |
| 41 | CXXCompilerTarget string `toml:"cxx_compiler_target,omitempty"` |
| 42 | |
| 43 | // Core compiler tools (Essential). |
| 44 | CPP string `toml:"cpp,omitempty"` // C preprocessor. |
| 45 | AR string `toml:"ar,omitempty"` // Archive static library. |
| 46 | LD string `toml:"ld,omitempty"` // Link executable. |
| 47 | AS string `toml:"as,omitempty"` // Assemble assembly code. |
| 48 | |
| 49 | // Object file manipulation tools. |
| 50 | OBJCOPY string `toml:"objcopy,omitempty"` // Copy object file. |
| 51 | OBJDUMP string `toml:"objdump,omitempty"` // Dump object file. |
| 52 | STRIP string `toml:"strip,omitempty"` // Strip executable and library. |
| 53 | READELF string `toml:"readelf,omitempty"` // Read ELF file. |
| 54 | SIZE string `toml:"size,omitempty"` // Display file size. |
| 55 | STRINGS string `toml:"strings,omitempty"` // Display strings in file. |
| 56 | |
| 57 | // Symbol and archive tools. |
| 58 | NM string `toml:"nm,omitempty"` // List symbols in object file. |
| 59 | RANLIB string `toml:"ranlib,omitempty"` // Index static library. |
| 60 | |
| 61 | // Code coverage tools. |
| 62 | GCOV string `toml:"gcov,omitempty"` // Gcov code coverage. |
| 63 | |
| 64 | // Debug and analysis tools. |
| 65 | ADDR2LINE string `toml:"addr2line,omitempty"` // Convert address to line number. |
| 66 | CXXFILT string `toml:"cxxfilt,omitempty"` // C++ symbol demangler. |
| 67 | |
| 68 | // Additional compiler tools. |
| 69 | FC string `toml:"fc,omitempty"` // Compile Fortran code. |
| 70 | |
| 71 | // Platform-aware envs, flags. |
| 72 | Envs []string `toml:"envs"` |
| 73 | CFlags []string `toml:"cflags"` |
nothing calls this directly
no outgoing calls
no test coverage detected