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 22:04:07 +01:00
commit 46f0385f32
2 changed files with 11 additions and 5 deletions

View file

@ -128,6 +128,7 @@ namespace Crafter {
std::cout << "1" << std::endl; std::cout << "1" << std::endl;
std::string libcxx = std::getenv("LIBCXX_DIR"); std::string libcxx = std::getenv("LIBCXX_DIR");
libcxx.pop_back();
libcxx.pop_back(); libcxx.pop_back();
std::cout << "2" << std::endl; std::cout << "2" << std::endl;

View file

@ -247,15 +247,14 @@ namespace Crafter {
std::string command = std::format("clang++ -stdlib=libc++ --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()); std::string command = std::format("clang++ -stdlib=libc++ --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());
for (const auto& entry : fs::recursive_directory_iterator(buildDir)) {
for (const auto& entry : fs::directory_iterator(buildDir)) { if (entry.is_directory() && entry.path().filename() == "include") {
if (entry.is_directory()) {
command += " -I" + entry.path().string() + " "; command += " -I" + entry.path().string() + " ";
} }
} }
for (const auto& entry : fs::directory_iterator(exeDir/"cloneCache")) { for (const auto& entry : fs::recursive_directory_iterator(exeDir / "cloneCache")) {
if (entry.is_directory()) { if (entry.is_directory() && entry.path().filename() == "include") {
command += " -I" + entry.path().string() + " "; command += " -I" + entry.path().string() + " ";
} }
} }
@ -344,7 +343,13 @@ namespace Crafter {
for(const CmakeDep& cmake : config.cmakeDeps) { for(const CmakeDep& cmake : config.cmakeDeps) {
depThreads.emplace_back([&cmake, &cmakeBuildType, &buildDir](){ depThreads.emplace_back([&cmake, &cmakeBuildType, &buildDir](){
#ifdef CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_linux_gnu
system(std::format("cd {} && cmake -B build -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_FLAGS=\"-stdlib=libc++\" -DCMAKE_EXE_LINKER_FLAGS=\"-stdlib=libc++\" -DCMAKE_SHARED_LINKER_FLAGS=\"-stdlib=libc++\" -DCMAKE_BUILD_TYPE={} -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY={} -DCMAKE_LIBRARY_OUTPUT_DIRECTORY={} {} && cmake --build build --config {}", cmake.path.string(), cmakeBuildType, buildDir.string(), buildDir.string(), cmake.options, cmakeBuildType).c_str()); system(std::format("cd {} && cmake -B build -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_FLAGS=\"-stdlib=libc++\" -DCMAKE_EXE_LINKER_FLAGS=\"-stdlib=libc++\" -DCMAKE_SHARED_LINKER_FLAGS=\"-stdlib=libc++\" -DCMAKE_BUILD_TYPE={} -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY={} -DCMAKE_LIBRARY_OUTPUT_DIRECTORY={} {} && cmake --build build --config {}", cmake.path.string(), cmakeBuildType, buildDir.string(), buildDir.string(), cmake.options, cmakeBuildType).c_str());
#endif
#if defined(CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_windows_msvc) || defined(CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_w64_mingw32)
system(std::format("cd {} && cmake -B build -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_FLAGS="-nostdinc++ -nostdlib++ -isystem %LIBCXX_DIR%\include\c++\v1" -DCMAKE_EXE_LINKER_FLAGS="-nostdinc++ -nostdlib++ -L %LIBCXX_DIR%\lib -lc++" -DCMAKE_SHARED_LINKER_FLAGS="-nostdinc++ -nostdlib++ -L %LIBCXX_DIR%\lib -lc++" -DCMAKE_BUILD_TYPE={} -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY={} -DCMAKE_LIBRARY_OUTPUT_DIRECTORY={} {} && cmake --build build --config {}", cmake.path.string(), cmakeBuildType, buildDir.string(), buildDir.string(), cmake.options, cmakeBuildType).c_str());
#endif
}); });
} }