windows build fix
Some checks failed
demo.yaml / windows build fix (push) Failing after 0s

This commit is contained in:
Jorijn van der Graaf 2026-03-02 23:44:09 +01:00
commit ffbec94c08

View file

@ -184,6 +184,8 @@ namespace Crafter {
}
}
std::cout << "0" << std::endl;
std::thread fileThread([&config, &outputDir](){
for (const fs::path& additionalFile : config.additionalFiles) {
fs::path destination = outputDir / additionalFile.filename();
@ -230,7 +232,9 @@ namespace Crafter {
fs::path exeDir = GetPath();
std::cout << "before pcm" << std::endl;
BuildStdPcm(*this, config);
std::cout << "after pcm" << std::endl;
std::string editedTarget = config.target;
std::replace(editedTarget.begin(), editedTarget.end(), '-', '_');
@ -243,6 +247,8 @@ namespace Crafter {
std::string command = std::format("clang++ -nostdinc++ -nostdlib++ -isystem %LIBCXX_DIR%\\include\\c++\\v1 --target={} -march={} -mtune={} -std={} -D CRAFTER_BUILD_CONFIGURATION_TARGET_{} -fprebuilt-module-path={}", config.target, config.march, config.march, config.standard, editedTarget, (exeDir/config.target).string());
#endif
std::cout << "2" << std::endl;
for (const auto& entry : fs::recursive_directory_iterator(buildDir)) {
if (entry.is_directory() && entry.path().filename() == "include") {
command += " -I" + entry.path().string() + " ";
@ -255,6 +261,8 @@ namespace Crafter {
}
}
std::cout << "4" << std::endl;
for (const auto& entry : fs::directory_iterator(buildDir)) {
if (entry.is_directory()) {
command += " -I" + entry.path().string() + " ";
@ -267,6 +275,8 @@ namespace Crafter {
}
}
std::cout << "3" << std::endl;
if(config.target == "wasm32-wasi") {
command += std::format(" --sysroot={} -fno-exceptions -fno-c++-static-destructors", (exeDir/"wasi-sysroot-28.0").string());
}
@ -319,6 +329,8 @@ namespace Crafter {
command += std::format(" -I{}", dir);
}
std::cout << "5" << std::endl;
std::unordered_set<std::string> depLibSet;
std::vector<std::thread> depThreads = std::vector<std::thread>(config.dependencies.size());
std::mutex libMutex;