46 void call(std::vector<std::string>*
args [[maybe_unused]],
bool force =
false,
47 bool debug =
false,
bool dummy =
false)
override {
46 void call(std::vector<std::string>*
args [[maybe_unused]],
bool force =
false, {
…}
51 void debug(std::vector<std::string>*
args, std::vector<std::string>* pargs)
override {
51 void debug(std::vector<std::string>*
args, std::vector<std::string>* pargs)
override {
…}
63 void run(std::vector<std::string>*
args)
override {
63 void run(std::vector<std::string>*
args)
override {
…}
112 CBuild::print(
"You cannot call \"set_id\" on config toolchain! Use constructor of "
113 "cross-compilation wrapper for this!",
118 CBuild::print(
"You cannot call \"set_name\" on config toolchain! Use constructor of "
119 "cross-compilation wrapper for this!",
124 this->vmajor_set =
true;
128 this->type_set =
true;
141 for (
auto cdep : this->
depends) {
153 for (
auto comp : this->
targets) {
160 if (this->
hasher != NULL) {
163 if (this->type_set) {
166 if (this->vmajor_set) {
180 this->default_tool =
"";
181 this->default_tool_set =
false;
190 for (; i < toollist.size(); i++) {
201 void run(std::vector<std::string>*
args)
override {
205 for (; i < toollist.size(); i++) {
201 void run(std::vector<std::string>*
args)
override {
…}
217 bool dummy =
false)
override {
218 std::vector<std::string> new_args;
221 if (
arg == std::string(
"select")) {
224 new_args.push_back(
arg);
227 if (
dummy ==
false) {
228 if (this->default_tool_set && !select) {
229 CBuild::print(std::string(
"Redirecting to default toolchain \"") +
230 this->default_tool + std::string(
"\"."),
238 for (; i < toollist.size(); i++) {
251 void debug(std::vector<std::string>*
args, std::vector<std::string>* pargs)
override {
252 std::vector<std::string> new_args;
255 if (
arg == std::string(
"select")) {
258 new_args.push_back(
arg);
261 if (this->default_tool_set && !select) {
262 CBuild::print(std::string(
"Redirecting to default toolchain \"") + this->default_tool +
271 for (; i < toollist.size(); i++) {
251 void debug(std::vector<std::string>*
args, std::vector<std::string>* pargs)
override {
…}
287 for (; i < toollist.size(); i++) {
299 return std::array<std::string, 3>{
"META",
"META",
"META"};
302 this->default_tool = arch;
303 this->default_tool_set =
true;
315 std::vector<std::string> ret;
316 for (
auto arch : this->toolchain_list) {
317 ret.push_back(arch.int_id);
322 for (
auto arch : this->toolchain_list) {
323 if (arch.int_id ==
id) {
330 return this->meta_config;
336 this->toolchain_list.push_back(
338 tool->
set_id(this->meta_id +
"-" +
id);
345 .internally_managed =
true});
348 for (
auto t : this->toolchain_list) {
354 for (
auto [
id, tool, flag] : this->toolchain_list) {
std::string meta_name
Output name for this group.
CrossCompiler(std::string id, std::string name)
Create new cross-compilation collection.
CBuild::Toolchain * get_global_config()
Get global configuration (for compatibility reasons returns CBuild::Toolchain* to config)
std::vector< std::string > get_toolchain_list()
Get list of sub-toolchains in this collection (skips config and meta-toolchain)
CBuild::Toolchain * get_arch_tool(std::string id)
Get toolchain for specific arch.
void perform_registry()
Register all internal toolchains.
CBuild::Toolchain * meta_config
Global configuration.
void set_default_tool(std::string arch)
Set default toolchain.
std::string meta_id
Id of this group.
void add_arch_tool(std::string id, CBuild::Toolchain *tool)
Create new architecture dependant tool.
void apply_global_config()
Load global configuration data into local, per-toolchain, configuration.
CBuild::Toolchain * meta_toolchain
Meta-toolchain fot this group.
CrossCompilation front-end for CBuild.
Custom implementation of map datatype.
void RegisterTarget(CBuild::Toolchain *target)
Register new target for build.
Filebuffer for CBuild ecosystem.
void print(std::string msg, color fg=CBuild::WHITE)
Print colored text to STDOUT.
void printf(color fg, const char *fmt,...) __attribute__((format(printf
Some poor printf implementation.
Custom print that support color codes.
Command for compile_commands.json.