From f6673d5bf45ac85bbdf714f31da8e2402fa89332 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=80=D0=B0=D0=BD=D0=B8=D0=BC=D0=B8=D1=80=20=D0=9A?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D1=9F=D0=B8=D1=9B?= Date: Sun, 27 Oct 2024 09:22:17 -0700 Subject: [PATCH] Fixed MinGW test. --- scripts/toolchain.lua | 4 ++-- src/file.cpp | 6 +++++- tests/filepath_test.cpp | 5 ----- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/scripts/toolchain.lua b/scripts/toolchain.lua index e781f63..fd58dbf 100644 --- a/scripts/toolchain.lua +++ b/scripts/toolchain.lua @@ -623,12 +623,12 @@ function toolchain(_buildDir, _libDir) "MINGW_HAS_SECURE_API=1", } buildoptions { + "-Wa,-mbig-obj", + "-Wundef", "-Wunused-value", "-fdata-sections", "-ffunction-sections", "-msse4.2", - "-Wunused-value", - "-Wundef", } linkoptions { "-Wl,--gc-sections", diff --git a/src/file.cpp b/src/file.cpp index bc6d9c3..c34a7ac 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -865,14 +865,18 @@ namespace bx return false; } -#if BX_CRT_MSVC +#if BX_CRT_MSVC || BX_CRT_MINGW int32_t result = -1; FileInfo fi; if (stat(fi, _filePath) ) { if (FileType::Dir == fi.type) { +# if BX_CRT_MINGW + result = ::rmdir(_filePath.getCPtr() ); +# else result = ::_rmdir(_filePath.getCPtr() ); +# endif // BX_CRT_MINGW } else { diff --git a/tests/filepath_test.cpp b/tests/filepath_test.cpp index 20ec764..7d5e1af 100644 --- a/tests/filepath_test.cpp +++ b/tests/filepath_test.cpp @@ -130,11 +130,6 @@ TEST_CASE("FilePath temp", "[filepath]") tmp.join("bx.test/abvgd/555333/test"); REQUIRE(bx::makeAll(tmp, bx::ErrorAssert{}) ); - if (BX_ENABLED(BX_CRT_MINGW) ) - { - SKIP("bx::removeAll fails on GHA MinGW container."); - } - tmp.set(bx::Dir::Temp); tmp.join("bx.test"); REQUIRE(bx::removeAll(tmp, bx::ErrorAssert{}) );