From 73883b58078bfd716774b8e28236293d0dd1e894 Mon Sep 17 00:00:00 2001 From: Jorijn van der Graaf Date: Mon, 2 Mar 2026 21:38:48 +0100 Subject: [PATCH] windows fix --- implementations/Crafter.Build-Command.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/implementations/Crafter.Build-Command.cpp b/implementations/Crafter.Build-Command.cpp index 3bcce4d..510787e 100644 --- a/implementations/Crafter.Build-Command.cpp +++ b/implementations/Crafter.Build-Command.cpp @@ -121,21 +121,31 @@ 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; + const char* libcxx = std::getenv("LIBCXX_DIR"); if (!libcxx) { std::cout << "LIBCXX_DIR environment variable not set" << std::endl; throw std::runtime_error("LIBCXX_DIR environment variable not set"); } + 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 << "4" << 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; throw std::runtime_error(result); } }