Skip to content

Commit 148961b

Browse files
committed
Try to fix CI
1 parent afff244 commit 148961b

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

.clang-format

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,4 @@ ReflowComments: true
5353
# Keep existing newlines in some cases
5454
MaxEmptyLinesToKeep: 1
5555
KeepEmptyLinesAtTheStartOfBlocks: false
56-
---
57-
Language: C
58-
BasedOnStyle: LLVM
59-
IndentWidth: 4
60-
ColumnLimit: 100
61-
PointerAlignment: Left
6256

src/detect.cpp

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222

2323
#if defined(_WIN32) || defined(_WIN64)
2424
#include <windows.h>
25+
// PROCESSOR_ARCHITECTURE_ARM64 may not be defined in older SDKs/MinGW
26+
#ifndef PROCESSOR_ARCHITECTURE_ARM64
27+
#define PROCESSOR_ARCHITECTURE_ARM64 12
28+
#endif
2529
#endif
2630

2731
#if defined(__FreeBSD__)
@@ -33,8 +37,8 @@ namespace archspec {
3337

3438
namespace {
3539

36-
// Helper to split string
37-
std::vector<std::string> split(const std::string& s, char delimiter) {
40+
// Helper to split string (used on Linux/macOS)
41+
[[maybe_unused]] std::vector<std::string> split(const std::string& s, char delimiter) {
3842
std::vector<std::string> tokens;
3943
std::string token;
4044
std::istringstream stream(s);
@@ -51,8 +55,8 @@ std::vector<std::string> split(const std::string& s, char delimiter) {
5155
return tokens;
5256
}
5357

54-
// Helper to convert string to lowercase
55-
std::string to_lower(const std::string& s) {
58+
// Helper to convert string to lowercase (used on macOS)
59+
[[maybe_unused]] std::string to_lower(const std::string& s) {
5660
std::string result = s;
5761
std::transform(result.begin(), result.end(), result.begin(), ::tolower);
5862
return result;
@@ -409,8 +413,6 @@ bool check_x86_64(const DetectedCpuInfo& info, const Microarchitecture& target)
409413
}
410414

411415
bool check_aarch64(const DetectedCpuInfo& info, const Microarchitecture& target) {
412-
const auto& db = MicroarchitectureDatabase::instance();
413-
414416
// Generic targets other than aarch64 itself aren't compatible
415417
if (target.vendor() == "generic" && target.name() != ARCH_AARCH64) {
416418
return false;
@@ -438,6 +440,7 @@ bool check_aarch64(const DetectedCpuInfo& info, const Microarchitecture& target)
438440
#if defined(__APPLE__)
439441
// On macOS, we can match by name for Apple Silicon
440442
if (!info.name.empty()) {
443+
const auto& db = MicroarchitectureDatabase::instance();
441444
const auto* model = db.get(info.name);
442445
if (model) {
443446
if (target.name() == info.name)

0 commit comments

Comments
 (0)