21#ifndef CBUILD_MINGW_GCC_TOOLCHAIN
22#define CBUILD_MINGW_GCC_TOOLCHAIN
45 this->
linker =
"x86_64-w64-mingw32-gcc";
46 this->
compiler =
"x86_64-w64-mingw32-gcc";
47 this->
packer =
"x86_64-w64-mingw32-ar cr";
61 this->
linker =
"x86_64-w64-mingw32-gcc";
62 this->
compiler =
"x86_64-w64-mingw32-gcc";
63 this->
packer =
"x86_64-w64-mingw32-ar cr";
78 std::vector<std::string> hash_files;
79 if (files.size() > 0) {
80 for (
unsigned int i = 0; i < files.size(); i++) {
82 cmd += files.at(i).key;
86 cmd += files.at(i).data;
103 for (
unsigned int i = 0; i < files.size(); i++) {
104 flist += files.at(i).data;
107 if (files.size() > 0) {
129 for (
unsigned int i = 0; i < files.size(); i++) {
130 flist += files.at(i).data;
133 if (files.size() > 0) {
144 for (std::string
id : this->
depends) {
146 if (target != NULL) {
147 auto out_path = target->gen_out_name(
".exe",
".dll");
148 unsigned int end_slash = out_path.find_last_of(
'/');
150 "/" + out_path.substr(end_slash + 1);
157 std::string
gen_out_name(std::string executable =
".exe", std::string dyn_lib =
".dll",
158 std::string stat_lib =
".a")
override {
160 if (this->
name != std::string(
"")) {
157 std::string
gen_out_name(std::string executable =
".exe", std::string dyn_lib =
".dll", {
…}
272 void debug(std::vector<std::string>*
args, std::vector<std::string>* pargs)
override {
272 void debug(std::vector<std::string>*
args, std::vector<std::string>* pargs)
override {
…}
#define CBUILD_BUILD_OUT_DIR
Build out in build/toolchain.
#define CBUILD_BUILD_DIR
Build directory of CBuild.
MINGW_GCC(std::string id)
Construct a new MINGW_GCC object.
void build() override
Build.
void link() override
Linking.
MINGW_GCC(std::string id, std::string name)
Construct a new MINGW_GCC object.
void link_pack() override
Linking for static libraries.
void post_link() override
After linking.
void debug(std::vector< std::string > *args, std::vector< std::string > *pargs) override
Build program in debug mode and after run gdb on it.
std::string gen_out_name(std::string executable=".exe", std::string dyn_lib=".dll", std::string stat_lib=".a") override
Generate output file name (after linking)
CBuild::Toolchain * GetToolchain(std::string name, bool force=false)
Get the registered toolchain.
bool copy(std::string start, std::string end)
Copy files or directories.
Filebuffer for CBuild ecosystem.
uint64_t hash(std::string str)
FNV-1a hashing function for std::string.
void print(std::string msg, color fg=CBuild::WHITE)
Print colored text to STDOUT.
Custom print that support color codes.
Command for compile_commands.json.