Skip to content

Commit 96090b2

Browse files
committed
build(mcl): Access cpuid.x86_any only in version (x86)
1 parent d4b7747 commit 96090b2

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

packages/mcl/src/src/mcl/commands/host_info.d

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -301,10 +301,13 @@ struct ProcessorInfo
301301
ProcessorInfo getProcessorInfo()
302302
{
303303
ProcessorInfo r;
304-
r.vendor = cpuid.x86_any.vendor;
305-
char[48] modelCharArr;
306-
cpuid.x86_any.brand(modelCharArr);
307-
r.model = modelCharArr.idup[0 .. (strlen(modelCharArr.ptr) - 1)];
304+
version (x86)
305+
{
306+
r.vendor = cpuid.x86_any.vendor;
307+
char[48] modelCharArr;
308+
cpuid.x86_any.brand(modelCharArr);
309+
r.model = modelCharArr.idup[0 .. (strlen(modelCharArr.ptr) - 1)];
310+
}
308311
r.cpus = cpuid.unified.cpus();
309312
r.cores = [r.cpus * cpuid.unified.cores()];
310313
r.threads = [cpuid.unified.threads()];

0 commit comments

Comments
 (0)