threaded exception handling
Some checks failed
demo.yaml / threaded exception handling (push) Failing after 0s

This commit is contained in:
Jorijn van der Graaf 2025-11-15 19:20:33 +01:00
commit c2bb9023d4
14 changed files with 237 additions and 127 deletions

View file

@ -45,17 +45,23 @@ namespace Crafter {
return true;
}
}
void Implementation::Compile(const std::string_view clang, const fs::path& buildDir) const {
void Implementation::Compile(const std::string_view clang, const fs::path& buildDir, std::string& result) const {
for(ModulePartition* dependency : partitionDependencies) {
if(!dependency->compiled.load()) {
dependency->compiled.wait(false);
dependency->compiled.wait(CRAFTER_COMPILE_STATUS_WAITING);
if(dependency->compiled.load() == CRAFTER_COMPILE_STATUS_ERROR) {
return;
}
}
}
for(Module* dependency : moduleDependencies) {
if(!dependency->compiled.load()) {
dependency->compiled.wait(false);
dependency->compiled.wait(CRAFTER_COMPILE_STATUS_WAITING);
if(dependency->compiled.load() == CRAFTER_COMPILE_STATUS_ERROR) {
return;
}
}
}
RunClang(std::format("{} {}.cpp -c -o {}_impl.o", clang, path.string(), (buildDir/path.filename()).string()));
return RunClang(std::format("{} {}.cpp -c -o {}_impl.o", clang, path.string(), (buildDir/path.filename()).string()));
}
}