From 7d4d544001823db10493cc9c20efea91fcad55ad Mon Sep 17 00:00:00 2001 From: "William D. Jones" Date: Thu, 15 May 2025 18:36:04 -0400 Subject: [PATCH 1/2] Strip trailing slashes when checking for directories on Windows. --- kernel/io.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/kernel/io.cc b/kernel/io.cc index d5d2994b2..d7d126c4c 100644 --- a/kernel/io.cc +++ b/kernel/io.cc @@ -251,7 +251,15 @@ bool check_is_directory(const std::string& dirname) { #if defined(_WIN32) struct _stat info; - if (_stat(dirname.c_str(), &info) != 0) + auto dirname_ = dirname; + + /* On old versions of Visual Studio and current versions on MinGW, + _stat will fail if the path ends with a trailing slash. */ + if (dirname.back() == '/' || dirname.back() == '\\') { + dirname_ = dirname.substr(0, dirname.length() - 1); + } + + if (_stat(dirname_.c_str(), &info) != 0) { return false; } From 388955031ffb52fa194eacc008e2bb0345be5d18 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 17 May 2025 00:23:43 +0000 Subject: [PATCH 2/2] Bump version --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b3d6d6f29..304753d98 100644 --- a/Makefile +++ b/Makefile @@ -160,7 +160,7 @@ ifeq ($(OS), Haiku) CXXFLAGS += -D_DEFAULT_SOURCE endif -YOSYS_VER := 0.53+26 +YOSYS_VER := 0.53+39 YOSYS_MAJOR := $(shell echo $(YOSYS_VER) | cut -d'.' -f1) YOSYS_MINOR := $(shell echo $(YOSYS_VER) | cut -d'.' -f2 | cut -d'+' -f1) YOSYS_COMMIT := $(shell echo $(YOSYS_VER) | cut -d'+' -f2)