diff --git a/implementations/Crafter.Build-Command.cpp b/implementations/Crafter.Build-Command.cpp index be6ead4..6632083 100644 --- a/implementations/Crafter.Build-Command.cpp +++ b/implementations/Crafter.Build-Command.cpp @@ -152,13 +152,13 @@ namespace Crafter { 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, vsVars, 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, 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; + 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; } diff --git a/implementations/Crafter.Build-Configuration.cpp b/implementations/Crafter.Build-Configuration.cpp index 2ab0c6e..ed5093a 100644 --- a/implementations/Crafter.Build-Configuration.cpp +++ b/implementations/Crafter.Build-Configuration.cpp @@ -75,8 +75,8 @@ namespace Crafter { std::cout << "before auto" << std::endl; AutoDetect(); std::cout << "auto" << std::endl; - std::cout << std::format("{} clang-cl.exe -print-target-triple", vsVars) << std::endl; - target = RunCommand(std::format("{} clang-cl.exe -print-target-triple", vsVars)); + std::cout << std::format("{} && clang-cl.exe -print-target-triple", vsVars) << std::endl; + target = RunCommand(std::format("{} && clang-cl.exe -print-target-triple", vsVars)); std::cout << target << std::endl; #endif target.pop_back(); diff --git a/implementations/Crafter.Build-Project.cpp b/implementations/Crafter.Build-Project.cpp index 25b5c49..337b4ec 100644 --- a/implementations/Crafter.Build-Project.cpp +++ b/implementations/Crafter.Build-Project.cpp @@ -250,7 +250,7 @@ namespace Crafter { std::string command = std::format("clang++ --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 #if defined(CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_windows_msvc) || defined(CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_w64_mingw32) - std::string command = std::format("{} clang-cl.exe /EHsc --target={} -march={} -mtune={} /std:{} /D CRAFTER_BUILD_CONFIGURATION_TARGET_{} -fprebuilt-module-path={}", vsVars, config.target, config.march, config.march, config.standard, editedTarget, (exeDir/config.target).string()); + std::string command = std::format("{} && clang-cl.exe /EHsc --target={} -march={} -mtune={} /std:{} /D CRAFTER_BUILD_CONFIGURATION_TARGET_{} -fprebuilt-module-path={}", vsVars, config.target, config.march, config.march, config.standard, editedTarget, (exeDir/config.target).string()); #endif if(config.target == "wasm32-wasi") { @@ -470,7 +470,7 @@ namespace Crafter { libPath += std::format(" /LIBPATH:{}", lib); } - buildResult.errors = RunCommand(std::format("{} link.exe {} {} {}\\{}\\std.o msvcrt.lib kernel32.lib user32.lib /OUT:{}.exe", vsVars, libPath, files, exeDir.string(), config.target, (binDir/outputName).string())); + buildResult.errors = RunCommand(std::format("{} && link.exe {} {} {}\\{}\\std.o msvcrt.lib kernel32.lib user32.lib /OUT:{}.exe", vsVars, libPath, files, exeDir.string(), config.target, (binDir/outputName).string())); #endif } else if(config.type == CRAFTER_CONFIGURATION_TYPE_LIBRARY) { #ifdef CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_linux_gnu @@ -478,7 +478,7 @@ namespace Crafter { #endif #if defined(CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_windows_msvc) || defined(CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_w64_mingw32) - RunCommandIgnore(std::format("{} lib.exe {} /OUT:{}.lib", vsVars, files, (binDir/fs::path(outputName)).string())); + RunCommandIgnore(std::format("{} && lib.exe {} /OUT:{}.lib", vsVars, files, (binDir/fs::path(outputName)).string())); #endif } else { #ifdef CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_linux_gnu