fixed mingw
Some checks failed
demo.yaml / fixed mingw (push) Failing after 0s

This commit is contained in:
Jorijn van der Graaf 2026-04-02 16:53:07 +02:00
commit 2d89528bdf
5 changed files with 51 additions and 35 deletions

View file

@ -237,10 +237,14 @@ namespace Crafter {
#ifdef CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_linux_gnu
std::string command = std::format("clang++ -stdlib=libc++ --target={} -march={} -mtune={} -std={} -D CRAFTER_BUILD_CONFIGURATION_TARGET=\\\"{}\\\" -D CRAFTER_BUILD_CONFIGURATION_TARGET_{} -fprebuilt-module-path={}", config.target, config.march, config.march, config.standard, editedTarget, editedTarget, (exeDir/(config.target+config.march)).string());
std::string stdlib = "-stdlib=libc++";
if(config.target == "x86_64-w64-mingw32") {
stdlib = "";
}
std::string command = std::format("clang++ {} --target={} -march={} -mtune={} -std={} -D CRAFTER_BUILD_CONFIGURATION_TARGET=\\\"{}\\\" -D CRAFTER_BUILD_CONFIGURATION_TARGET_{} -fprebuilt-module-path={}", stdlib, config.target, config.march, config.mtune, config.standard, editedTarget, editedTarget, (exeDir/(config.target+config.march)).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++ -nostdinc++ -nostdlib++ -isystem %LIBCXX_DIR%\\include\\c++\\v1 --target={} -march={} -mtune={} -std={} -D CRAFTER_BUILD_CONFIGURATION_TARGET=\"\"{}\"\" -D CRAFTER_BUILD_CONFIGURATION_TARGET_{} -fprebuilt-module-path={}", config.target, config.march, config.march, config.standard, editedTarget, editedTarget, (exeDir/(config.target+config.march)).string());
std::string command = std::format("clang++ -nostdinc++ -nostdlib++ -isystem %LIBCXX_DIR%\\include\\c++\\v1 --target={} -march={} -mtune={} -std={} -D CRAFTER_BUILD_CONFIGURATION_TARGET=\"\"{}\"\" -D CRAFTER_BUILD_CONFIGURATION_TARGET_{} -fprebuilt-module-path={}", config.target, config.march, config.mtune, config.standard, editedTarget, editedTarget, (exeDir/(config.target+config.march)).string());
#endif
for (const auto& entry : fs::recursive_directory_iterator(buildDir)) {
@ -455,6 +459,10 @@ namespace Crafter {
command += std::format(" -L{}", pcmDir.string());
}
if(config.target == "x86_64-w64-mingw32"){
command += std::format(" -L{}", binDir.string());
}
if(buildResult.repack) {
if(config.type == CRAFTER_CONFIGURATION_TYPE_EXECUTABLE) {
if(config.target == "wasm32-wasi") {