21#ifndef CBUILD_GCCMT_TOOLCHAIN
22#define CBUILD_GCCMT_TOOLCHAIN
77 std::atomic_int64_t read_ptr;
78 read_ptr.store(files.size() - 1);
80 unsigned int num_threads = std::thread::hardware_concurrency();
82 std::thread threads[num_threads];
83 for (
unsigned int i = 0; i < num_threads; i++) {
84 threads[i] = std::thread([&files,
this, &
args, &read_ptr](
void) ->
void {
87 int64_t i = read_ptr.fetch_sub(1);
93 cmd += files.at(i).key;
97 cmd += files.at(i).data;
99 std::this_thread::get_id();
105 for (
unsigned int i = 0; i < num_threads; i++) {
118 std::atomic_int64_t read_ptr;
119 read_ptr.store(files.size() - 1);
121 unsigned int num_threads = std::thread::hardware_concurrency();
123 std::thread threads[num_threads];
124 for (
unsigned int i = 0; i < num_threads; i++) {
125 threads[i] = std::thread([&files,
this, &
args, &read_ptr](
void) ->
void {
128 int64_t i = read_ptr.fetch_sub(1);
134 cmd += files.at(i).key;
138 cmd += files.at(i).data;
140 std::this_thread::get_id();
146 for (
unsigned int i = 0; i < num_threads; i++) {
160 for (
unsigned int i = 0; i < files.size(); i++) {
161 flist += files.at(i).data;
164 if (files.size() > 0) {
void link_pack() override
Linking for static libraries.
void build() override
Build.
GCCMT(std::string id, std::string name)
Construct a new GCCMT object.
void link() override
Linking.
GCCMT(std::string id)
Construct a new GCCMT object.
Filebuffer for CBuild ecosystem.
uint64_t hash(std::string str)
FNV-1a hashing function for std::string.
Command for compile_commands.json.