[cmake] enable clang-cl and WoA builds (#348)

Compilation and CMake fixes for both Windows on ARM and clang-cl, meaning Windows can now be built on both MSVC and clang on both amd64 and aarch64.

Compiling on clang is *dramatically* faster so this should be useful for CI.

Co-authored-by: crueter <crueter@eden-emu.dev>
Co-authored-by: crueter <crueter@crueter.xyz>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/348
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Reviewed-by: crueter <crueter@eden-emu.dev>
Co-authored-by: lizzie <lizzie@eden-emu.dev>
Co-committed-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
lizzie
2025-09-09 20:47:49 +02:00
committed by crueter
parent 428f136a75
commit 9d2681ecc9
276 changed files with 973 additions and 1010 deletions
+2 -2
View File
@@ -507,9 +507,9 @@ bool VfsRawCopy(const VirtualFile& src, const VirtualFile& dest, std::size_t blo
if (!dest->Resize(src->GetSize()))
return false;
std::vector<u8> temp(std::min(block_size, src->GetSize()));
std::vector<u8> temp((std::min)(block_size, src->GetSize()));
for (std::size_t i = 0; i < src->GetSize(); i += block_size) {
const auto read = std::min(block_size, src->GetSize() - i);
const auto read = (std::min)(block_size, src->GetSize() - i);
if (src->Read(temp.data(), read, i) != read) {
return false;
+2 -2
View File
@@ -43,7 +43,7 @@ public:
}
std::size_t Read(u8* data, std::size_t length, std::size_t offset) const override {
const auto read = std::min(length, size - offset);
const auto read = (std::min)(length, size - offset);
std::fill(data, data + read, value);
return read;
}
@@ -61,7 +61,7 @@ public:
}
std::vector<u8> ReadBytes(std::size_t length, std::size_t offset) const override {
const auto read = std::min(length, size - offset);
const auto read = (std::min)(length, size - offset);
return std::vector<u8>(read, value);
}
+2 -2
View File
@@ -37,7 +37,7 @@ bool VectorVfsFile::IsReadable() const {
}
std::size_t VectorVfsFile::Read(u8* data_, std::size_t length, std::size_t offset) const {
const auto read = std::min(length, data.size() - offset);
const auto read = (std::min)(length, data.size() - offset);
std::memcpy(data_, data.data() + offset, read);
return read;
}
@@ -45,7 +45,7 @@ std::size_t VectorVfsFile::Read(u8* data_, std::size_t length, std::size_t offse
std::size_t VectorVfsFile::Write(const u8* data_, std::size_t length, std::size_t offset) {
if (offset + length > data.size())
data.resize(offset + length);
const auto write = std::min(length, data.size() - offset);
const auto write = (std::min)(length, data.size() - offset);
std::memcpy(data.data() + offset, data_, write);
return write;
}
+1 -1
View File
@@ -45,7 +45,7 @@ public:
}
std::size_t Read(u8* data_, std::size_t length, std::size_t offset) const override {
const auto read = std::min(length, size - offset);
const auto read = (std::min)(length, size - offset);
std::memcpy(data_, data.data() + offset, read);
return read;
}