From e7bd4c27b8d2931fe741a21ef6e2a62b682b757c Mon Sep 17 00:00:00 2001 From: Jorijn van der Graaf Date: Sun, 1 Mar 2026 17:35:11 +0100 Subject: [PATCH] windows build fixes --- implementations/Crafter.Build-Command.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/implementations/Crafter.Build-Command.cpp b/implementations/Crafter.Build-Command.cpp index 3ff76c7..be6ead4 100644 --- a/implementations/Crafter.Build-Command.cpp +++ b/implementations/Crafter.Build-Command.cpp @@ -150,17 +150,15 @@ namespace Crafter { std::string sourceFilePath = directoryPath + "\\MSVC\\" + msvcVersion + "\\modules\\std.ixx"; - std::println("Auto-Detected:\nCL: {}Clang: {}\nstd.ixx: {}", clDir, clangClDir, sourceFilePath); - if(!fs::exists(stdPcm) || fs::last_write_time(stdPcm) < fs::last_write_time(sourceFilePath)) { fs::copy(sourceFilePath, stdcppm, fs::copy_options::overwrite_existing); - std::string result = RunCommand(std::format("cd {}\\{} && \"{} clang-cl.exe /EHsc /MD /std:c++latest --target=x86_64-pc-windows-msvc -Wno-include-angled-in-module-purview -Wno-reserved-identifier -Wno-reserved-module-identifier --precompile std.cppm -o std.pcm", exeDir.string(), config.target, clangClDir, stdPcm)); + std::string result = RunCommand(std::format("cd {}\\{} && \"{} clang-cl.exe /EHsc /MD /std:c++latest --target=x86_64-pc-windows-msvc -Wno-include-angled-in-module-purview -Wno-reserved-identifier -Wno-reserved-module-identifier --precompile std.cppm -o std.pcm", exeDir.string(), config.target, vsVars, stdPcm)); if(result != "") { std::cout << result << std::endl; throw std::runtime_error(result); } - result = RunCommand(std::format("cd {}\\{} && {} cl.exe /std:c++latest /EHsc /nologo /W4 /MD /c \"{}\"", exeDir.string(), config.target, clDir, sourceFilePath)); - std::cout << std::format("cd {}\\{} && {} cl.exe /std:c++latest /EHsc /nologo /W4 /MD /c \"{}\"", exeDir.string(), config.target, clDir, sourceFilePath) << std::endl; + result = RunCommand(std::format("cd {}\\{} && {} cl.exe /std:c++latest /EHsc /nologo /W4 /MD /c \"{}\"", exeDir.string(), config.target, vsVars, sourceFilePath)); + std::cout << std::format("cd {}\\{} && {} cl.exe /std:c++latest /EHsc /nologo /W4 /MD /c \"{}\"", exeDir.string(), config.target, vsVars, sourceFilePath) << std::endl; std::cout << result << std::endl; std::cout << "hello?" << std::endl; }