From 58c43f2942ab61b983011d797944c5eb0c2aca2b Mon Sep 17 00:00:00 2001 From: Jorijn van der Graaf Date: Mon, 2 Mar 2026 22:48:30 +0100 Subject: [PATCH] windows build fix --- implementations/Crafter.Build-Command.cpp | 11 +---------- implementations/Crafter.Build-Project.cpp | 4 +++- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/implementations/Crafter.Build-Command.cpp b/implementations/Crafter.Build-Command.cpp index cf8217f..c1c77ee 100644 --- a/implementations/Crafter.Build-Command.cpp +++ b/implementations/Crafter.Build-Command.cpp @@ -121,27 +121,18 @@ namespace Crafter { } void BuildMsvcStdPcm(const Project& project, const Configuration& config) { - std::cout << "0" << std::endl; fs::path exeDir = GetPath(); fs::create_directories(exeDir/config.target); - std::cout << "1" << std::endl; - std::string libcxx = std::getenv("LIBCXX_DIR"); - std::cout << "2" << std::endl; - std::string stdPcm = std::format("{}\\{}\\std.pcm", exeDir.string(), config.target); - std::cout << "3" << std::endl; std::string stdcppm = std::format("{}\\modules\\c++\\v1\\std.cppm", libcxx); - std::cout << stdcppm << std::endl; if(!fs::exists(stdPcm) || fs::last_write_time(stdPcm) < fs::last_write_time(stdcppm)) { - std::cout << "5" << std::endl; std::string result = RunCommand(std::format("clang++ --target={} -march=native -mtune=native -isystem %LIBCXX_DIR%\\include\\c++\\v1 -nostdinc++ -nostdlib++ -std=c++26 -Wno-reserved-identifier -Wno-reserved-module-identifier --precompile %LIBCXX_DIR%\\modules\\c++\\v1\\std.cppm -o {}", config.target, stdPcm)); - std::cout << "6" << std::endl; if(result != "") { - std::cout << result << std::endl; + std::cout << result << std::endl; throw std::runtime_error(result); } } diff --git a/implementations/Crafter.Build-Project.cpp b/implementations/Crafter.Build-Project.cpp index 0d72d67..10aae09 100644 --- a/implementations/Crafter.Build-Project.cpp +++ b/implementations/Crafter.Build-Project.cpp @@ -475,7 +475,9 @@ namespace Crafter { #endif #if defined(CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_windows_msvc) || defined(CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_w64_mingw32) - system("copy %LIBCXX_DIR%\\lib\\c++.dll .\\bin\\executable-windows-msvc\\c++.dll");// + system("echo %LIBCXX_DIR%\\lib\\c++.dll"); + system("echo .\\bin\\executable-windows-msvc\\c++.dll"); + system("copy %LIBCXX_DIR%\\lib\\c++.dll .\\bin\\executable-windows-msvc\\c++.dll"); buildResult.errors = RunClang(std::format("{}{} -o {} -fuse-ld=lld -L %LIBCXX_DIR%\\lib -lc++ -nostdinc++ -nostdlib++", command, files, (binDir/outputName).string())); #endif } else if(config.type == CRAFTER_CONFIGURATION_TYPE_LIBRARY) {