[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
No known key found for this signature in database
GPG key ID: 425ACD2D4830EBC6
276 changed files with 973 additions and 1010 deletions

View file

@ -67,7 +67,7 @@ Result NotificationServiceImpl::ListAlarmSettings(s32* out_count,
std::span<AlarmSetting> out_alarms) {
LOG_INFO(Service_NOTIF, "called, alarm_count={}", alarms.size());
const auto count = std::min(out_alarms.size(), alarms.size());
const auto count = (std::min)(out_alarms.size(), alarms.size());
for (size_t i = 0; i < count; i++) {
out_alarms[i] = alarms[i];
}
@ -90,7 +90,7 @@ Result NotificationServiceImpl::LoadApplicationParameter(u32* out_size,
LOG_WARNING(Service_NOTIF, "(STUBBED) called, alarm_setting_id={}", alarm_setting_id);
std::memcpy(out_application_parameter.data(), application_parameter.data(),
std::min(sizeof(application_parameter), out_application_parameter.size()));
(std::min)(sizeof(application_parameter), out_application_parameter.size()));
*out_size = static_cast<u32>(application_parameter.size());
R_SUCCEED();

View file

@ -29,7 +29,7 @@ static s64 CalendarTimeToEpoch(Service::PSC::Time::CalendarTime calendar) {
};
s16 month_s16{calendar.month};
s8 month{static_cast<s8>(((month_s16 * 43) & ~std::numeric_limits<s16>::max()) +
s8 month{static_cast<s8>(((month_s16 * 43) & ~(std::numeric_limits<s16>::max)()) +
((month_s16 * 43) >> 9))};
s8 month_index{static_cast<s8>(calendar.month - 12 * month)};
if (month_index == 0) {
@ -71,13 +71,13 @@ static Service::PSC::Time::LocationName GetTimeZoneString(
Service::PSC::Time::LocationName configured_name{};
std::memcpy(configured_name.data(), configured_zone.data(),
std::min(configured_name.size(), configured_zone.size()));
(std::min)(configured_name.size(), configured_zone.size()));
if (!time_zone_binary.IsValid(configured_name)) {
configured_zone = Common::TimeZone::FindSystemTimeZone();
configured_name = {};
std::memcpy(configured_name.data(), configured_zone.data(),
std::min(configured_name.size(), configured_zone.size()));
(std::min)(configured_name.size(), configured_zone.size()));
}
ASSERT_MSG(time_zone_binary.IsValid(configured_name), "Invalid time zone {}!",